summaryrefslogtreecommitdiff
path: root/pcr/diaspora/diaspora.install
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-05-07 08:03:05 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-05-07 08:41:49 -0300
commit523a4df563343d6676be5c065688440dac367795 (patch)
treeec1bf846e2761eb4ad5d45785ce4b38e19ca9c4b /pcr/diaspora/diaspora.install
parent0376cdd9964e51be290270c6148910eae89ac366 (diff)
downloadabslibre-523a4df563343d6676be5c065688440dac367795.tar.gz
abslibre-523a4df563343d6676be5c065688440dac367795.tar.bz2
abslibre-523a4df563343d6676be5c065688440dac367795.zip
diaspora: add new package to [pcr]
Diffstat (limited to 'pcr/diaspora/diaspora.install')
-rw-r--r--pcr/diaspora/diaspora.install30
1 files changed, 30 insertions, 0 deletions
diff --git a/pcr/diaspora/diaspora.install b/pcr/diaspora/diaspora.install
new file mode 100644
index 000000000..30d4f6167
--- /dev/null
+++ b/pcr/diaspora/diaspora.install
@@ -0,0 +1,30 @@
+dusr=diaspora
+dhome=/usr/share/webapps/diaspora
+dlog=/var/log/diaspora
+detc=/etc/webapps/diaspora
+ddata=/var/lib/diaspora
+
+_chown() {
+ chown -R $dusr:$dusr $dhome $dlog $detc $ddata
+ systemd-tmpfiles --create diaspora.conf
+}
+
+## arg 1: the new package version
+post_install() {
+ getent passwd $dusr &> /dev/null || useradd -r -d $dhome -s /bin/bash $dusr
+ _chown
+ echo "Read the installation instructions at https://wiki.archlinux.org/index.php/Diaspora"
+}
+
+post_upgrade() {
+ _chown
+ echo "Read the upgrade instructions at https://wiki.archlinux.org/index.php/Diaspora"
+}
+
+## arg 1: the old package version
+post_remove() {
+ getent passwd $dusr &>/dev/null && userdel -f $dusr
+ return 0
+}
+
+# vim:set ts=2 sw=2 et: