owntone-server/debian/postinst

24 lines
572 B
Plaintext
Raw Normal View History

2004-04-05 22:16:16 -04:00
#!/bin/sh -e
action="$1"
2005-02-13 20:32:22 -05:00
CONF=/etc/mt-daapd.conf
PLAY=/etc/mt-daapd.playlist
CACHE=/var/cache/mt-daapd
2004-04-05 22:16:16 -04:00
case "$1" in
configure)
2005-02-13 20:32:22 -05:00
if [ -x /etc/init.d/daap ]; then
if ( grep "mt-daapd" /etc/init.d/daap > /dev/null 2>&1 ); then
echo "Removing /etc/init.d/daap. New startup script is mt-daapd."
rm /etc/init.d/daap
fi
fi
2004-04-05 22:16:16 -04:00
if [ ! -f $CONF ] ; then cp /usr/share/doc/mt-daapd/mt-daapd.conf $CONF; fi
if [ ! -f $PLAY ] ; then cp /usr/share/doc/mt-daapd/mt-daapd.playlist $PLAY; fi
if [ ! -d $CACHE ] ; then mkdir -p $CACHE; fi
2004-04-05 22:16:16 -04:00
;;
esac
2005-02-13 20:32:22 -05:00