summaryrefslogtreecommitdiff
path: root/pcr/diaspora-git/diaspora.install
diff options
context:
space:
mode:
authorcoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2014-08-27 05:07:26 -0300
committercoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2014-08-27 05:07:26 -0300
commit0ff008e3c9dcc5ef088f481dfff3dcd121575598 (patch)
treed6f6cf5d6939e1f030a48d3711d3606570afd08f /pcr/diaspora-git/diaspora.install
parented9d1c12bbfcf9cb8b3d53e886edb679df372640 (diff)
downloadabslibre-0ff008e3c9dcc5ef088f481dfff3dcd121575598.tar.gz
abslibre-0ff008e3c9dcc5ef088f481dfff3dcd121575598.tar.bz2
abslibre-0ff008e3c9dcc5ef088f481dfff3dcd121575598.zip
move some packages from [social] to [pcr] and remove unused [social]
Diffstat (limited to 'pcr/diaspora-git/diaspora.install')
-rw-r--r--pcr/diaspora-git/diaspora.install28
1 files changed, 28 insertions, 0 deletions
diff --git a/pcr/diaspora-git/diaspora.install b/pcr/diaspora-git/diaspora.install
new file mode 100644
index 000000000..7833be058
--- /dev/null
+++ b/pcr/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
+}