From 523a4df563343d6676be5c065688440dac367795 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Thu, 7 May 2015 08:03:05 -0300 Subject: diaspora: add new package to [pcr] --- pcr/diaspora/diaspora.install | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 pcr/diaspora/diaspora.install (limited to 'pcr/diaspora/diaspora.install') 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: -- cgit v1.2.3