summarylogtreecommitdiffstats
path: root/forked-daapd.install
diff options
context:
space:
mode:
authorJohn-Michael Mulesa2016-06-05 17:57:52 -0700
committerJohn-Michael Mulesa2016-06-05 17:57:52 -0700
commitf814e46454aaed3fbf02b40c662a3b5d65b87ed2 (patch)
tree332cf0596236639f20c7f943a83641dadfb375f6 /forked-daapd.install
downloadaur-f814e46454aaed3fbf02b40c662a3b5d65b87ed2.tar.gz
Initial import of updated forked-daapd package into the new AUR.
Diffstat (limited to 'forked-daapd.install')
-rw-r--r--forked-daapd.install30
1 files changed, 30 insertions, 0 deletions
diff --git a/forked-daapd.install b/forked-daapd.install
new file mode 100644
index 00000000000..6d8e8045183
--- /dev/null
+++ b/forked-daapd.install
@@ -0,0 +1,30 @@
+post_install() {
+ mkdir -p /var/lib/forked-daapd
+ getent group daapd &>/dev/null || groupadd -r daapd >/dev/null
+ getent passwd daapd &>/dev/null || useradd -r -g daapd -d /var/lib/forked-daapd -s /bin/false -c forked-daapd daapd >/dev/null
+ mkdir -p $pkgdir/var/cache/forked-daapd
+ chown daapd:daapd $pkgdir/var/cache/forked-daapd
+
+ cat <<EOF
+==> forked-daapd can be started via systemctl:
+==> systemctl start forked-daapd
+
+==> forked-daapd can be autostart via systemctl:
+==> systemctl enable forked-daapd
+
+==> forked-daapd.service has been added to your /etc/avahi/services
+
+==> Please edit /etc/forked-daapd.conf to suit your needs
+==> (point it to your music library)
+EOF
+}
+
+pre_remove() {
+ systemctl stop forked-daapd || true
+ systemctl disable forked-daapd || true
+}
+
+post_remove() {
+ getent passwd forked-daapd &>/dev/null && userdel forked-daapd >/dev/null
+ getent group forked-daapd &>/dev/null && groupdel forked-daapd >/dev/null
+}