summaryrefslogtreecommitdiff
path: root/pcr/monkeysphere/monkeysphere.install
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-02-16 00:07:09 -0800
committerroot <root@rshg054.dnsready.net>2013-02-16 00:07:09 -0800
commit4a4f6be8604aa35bdc81ae29d86b07dc8aea0c5c (patch)
tree41f9694a761d6e5637f15f9f9241e5b84cd8897b /pcr/monkeysphere/monkeysphere.install
parent067830244f6b16cb094a59e5ca8fa262bd66a2ec (diff)
Sat Feb 16 00:07:08 PST 2013
Diffstat (limited to 'pcr/monkeysphere/monkeysphere.install')
-rw-r--r--pcr/monkeysphere/monkeysphere.install43
1 files changed, 43 insertions, 0 deletions
diff --git a/pcr/monkeysphere/monkeysphere.install b/pcr/monkeysphere/monkeysphere.install
new file mode 100644
index 000000000..2013f9f41
--- /dev/null
+++ b/pcr/monkeysphere/monkeysphere.install
@@ -0,0 +1,43 @@
+#!/bin/sh
+# $Id: monkeysphere.install 264 2010-11-10 00:57:53Z shtrom $
+# vim:set ts=2 sw=2 et:
+
+# arg 1: the new package version
+pre_install() {
+ /bin/true
+}
+
+# arg 1: the new package version
+post_install() {
+ echo ">>> Creating monkeysphere user and group and setting permissions..."
+ getent group monkeysphere >/dev/null || usr/sbin/groupadd monkeysphere
+ getent passwd monkeysphere >/dev/null || usr/sbin/useradd -c 'Monkeysphere WoT server identification tool' -g monkeysphere -d '/var/lib/monkeysphere' -s /bin/bash monkeysphere
+
+# Should be root:root for sshd to work
+ chown root:root /var/lib/monkeysphere
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+pre_upgrade() {
+ /bin/true
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+# Should be root:root for sshd to work
+ chown root:root /var/lib/monkeysphere
+}
+
+# arg 1: the old package version
+pre_remove() {
+ usr/sbin/userdel monkeysphere &>/dev/null
+ (getent group monkeysphere >/dev/null && usr/sbin/groupdel monkeysphere &>/dev/null) || /bin/true
+}
+
+# arg 1: the old package version
+post_remove() {
+ /bin/true
+}
+