summaryrefslogtreecommitdiff
path: root/social/monkeysphere/monkeysphere.install
diff options
context:
space:
mode:
authorNicolás Reynolds <apoyosis@correo.inta.gob.ar>2011-02-14 17:21:27 -0300
committerNicolás Reynolds <apoyosis@correo.inta.gob.ar>2011-02-14 17:21:27 -0300
commit568929c75b5a62756a0b984709e7db8795c6bcdf (patch)
tree076a408a7442a9a08c2b19f4d3eca196bd9f1a9a /social/monkeysphere/monkeysphere.install
parent4253d9d631fb5aec2e5621169816601a727ca38f (diff)
downloadabslibre-568929c75b5a62756a0b984709e7db8795c6bcdf.tar.gz
abslibre-568929c75b5a62756a0b984709e7db8795c6bcdf.tar.bz2
abslibre-568929c75b5a62756a0b984709e7db8795c6bcdf.zip
[social] repo
Diffstat (limited to 'social/monkeysphere/monkeysphere.install')
-rw-r--r--social/monkeysphere/monkeysphere.install40
1 files changed, 40 insertions, 0 deletions
diff --git a/social/monkeysphere/monkeysphere.install b/social/monkeysphere/monkeysphere.install
new file mode 100644
index 000000000..cc31e728d
--- /dev/null
+++ b/social/monkeysphere/monkeysphere.install
@@ -0,0 +1,40 @@
+#!/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
+ chown monkeysphere:monkeysphere /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() {
+ /bin/true
+}
+
+# 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
+}
+