summaryrefslogtreecommitdiff
path: root/pkgs/social/diaspora-git/diaspora.install
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/social/diaspora-git/diaspora.install')
-rw-r--r--pkgs/social/diaspora-git/diaspora.install29
1 files changed, 29 insertions, 0 deletions
diff --git a/pkgs/social/diaspora-git/diaspora.install b/pkgs/social/diaspora-git/diaspora.install
new file mode 100644
index 0000000..41fa744
--- /dev/null
+++ b/pkgs/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 || useradd -r -d $dhome -s /bin/bash $dusr
+ chown -R $dusr:$dusr $dhome $dgems
+ [[ -f $dlog ]] && chown $dusr:$dusr $dlog
+}
+
+pre_upgrade(){
+ etc/rc.d/diaspora stop
+ return 0
+}
+
+post_upgrade(){
+ post_install $1
+}
+
+pre_remove(){
+ pre_upgrade $1
+}
+
+post_remove(){
+ getent passwd $dusr && userdel -f $dusr
+ return 0
+}