diff options
author | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2011-01-28 03:23:04 -0300 |
---|---|---|
committer | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2011-01-28 03:23:04 -0300 |
commit | 4fd38b1c7635719535ed16a2ed7cf6814ded90f8 (patch) | |
tree | 5a3adb6091fae6f777c4654663018715d04ab789 /pkgs/social/diaspora-git/diaspora.install | |
parent | 21c6105c4fdacb617bd6a1cc06222f1de93be47e (diff) |
Diffstat (limited to 'pkgs/social/diaspora-git/diaspora.install')
-rw-r--r-- | pkgs/social/diaspora-git/diaspora.install | 29 |
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 +} |