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.install29
1 files changed, 29 insertions, 0 deletions
diff --git a/social/diaspora-git/diaspora.install b/social/diaspora-git/diaspora.install
new file mode 100644
index 000000000..faf2cb78f
--- /dev/null
+++ b/social/diaspora-git/diaspora.install
@@ -0,0 +1,29 @@
+
+dusr=diaspora
+dhome=/usr/share/webapps/diaspora
+dgems=/usr/share/webapps/diaspora-gems
+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 $dgems &>/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
+}