summaryrefslogtreecommitdiff
path: root/social/diaspora-git/diaspora.install
diff options
context:
space:
mode:
Diffstat (limited to 'social/diaspora-git/diaspora.install')
-rw-r--r--social/diaspora-git/diaspora.install28
1 files changed, 28 insertions, 0 deletions
diff --git a/social/diaspora-git/diaspora.install b/social/diaspora-git/diaspora.install
new file mode 100644
index 000000000..7833be058
--- /dev/null
+++ b/social/diaspora-git/diaspora.install
@@ -0,0 +1,28 @@
+
+dusr=diaspora
+dhome=/usr/share/webapps/diaspora
+dlog=/var/log/diaspora.log
+
+post_install() {
+ getent passwd $dusr &>/dev/null || useradd -r -d $dhome -s /bin/bash $dusr &>/dev/null
+ chown -R $dusr:$dusr $dhome &>/dev/null
+ [[ -f $dlog ]] && chown $dusr:$dusr $dlog
+}
+
+pre_upgrade(){
+ etc/rc.d/diaspora stop &>/dev/null
+ return 0
+}
+
+post_upgrade(){
+ post_install $1
+}
+
+pre_remove(){
+ pre_upgrade $1
+}
+
+post_remove(){
+ getent passwd $dusr &>/dev/null && userdel -f $dusr
+ return 0
+}