updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / forked-daapd / forked-daapd.install
blobdb7fb9528f0acf400f99ae178f37eace5af973f0
1 post_install() {
2   mkdir -p /var/lib/forked-daapd
3   getent group daapd &>/dev/null || groupadd -r daapd >/dev/null
4   getent passwd daapd &>/dev/null || useradd -r -g daapd -d /var/lib/forked-daapd -s /bin/false -c forked-daapd daapd >/dev/null
5   mkdir -p $pkgdir/var/cache/forked-daapd
6   chown daapd:daapd $pkgdir/var/cache/forked-daapd
8   cat <<EOF
9 ==> The following daemons may be added to DAEMONS in /etc/rc.conf:
10 ==> forked-daapd: daapd server for iTunes and SoundBridge
12 ==> forked-daapd.service has been added to your /etc/avahi/services
14 ==> Please edit /etc/forked-daapd.conf to suit your needs 
15 ==> (point it to your music library)
16 EOF
19 pre_remove() {
20   #stop forked-daapd if running (ignoring errors)
21   /etc/rc.d/forked-daapd stop || true
22   
23   #should I delete /var/lib/forked-daapd ?
26 post_remove() {
27   getent passwd forked-daapd &>/dev/null && userdel forked-daapd >/dev/null
28   getent group forked-daapd &>/dev/null && groupdel forked-daapd >/dev/null