updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / forked-daapd-git / forked-daapd-git.install
blobb8bd113bbdb9d633523b2bcec154a63de6d1adc5
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 ==> A daapd user has been created, if you want to use local audio
13 ==> output (with DACP) you should add daapd user to audio group:
14 ==> gpasswd -a daapd audio
16 ==> Please edit /etc/forked-daapd.conf to suit your needs 
17 ==> (point it to your music library)
18 EOF
21 pre_remove() {
22   #stop forked-daapd if running (ignoring errors)
23   /etc/rc.d/forked-daapd stop || true
24   
25   #should I delete /var/lib/forked-daapd ?
28 post_remove() {
29   echo -n "==>> Removing daapd system user..."
30   getent passwd daapd &>/dev/null && userdel daapd >/dev/null
31   getent group daapd &>/dev/null && groupdel daapd >/dev/null