Debian package fixes

This commit is contained in:
Ron Pedde 2005-02-14 01:32:22 +00:00
parent bb899e873b
commit 564215c942
2 changed files with 14 additions and 7 deletions

6
debian/init.d vendored
View File

@ -34,7 +34,7 @@ case "$1" in
stop)
echo -n "Stopping $DESC: "
start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
--signal 2
--signal 2 --exec $DAEMON --oknodo
echo "$NAME."
;;
#reload)
@ -56,8 +56,8 @@ case "$1" in
# just the same as "restart".
#
echo -n "Restarting $DESC: "
start-stop-daemon --stop --quiet --pidfile \
/var/run/$NAME.pid --exec $DAEMON
start-stop-daemon --stop --quiet --exec $DAEMON --pidfile \
/var/run/$NAME.pid --oknodo
sleep 1
start-stop-daemon --start --quiet --pidfile \
/var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS

15
debian/postinst vendored
View File

@ -1,16 +1,23 @@
#!/bin/sh -e
action="$1"
CONFDIR=/etc/mt-daapd
CONF=$CONFDIR/mt-daapd.conf
PLAY=$CONFDIR/mt-daapd.playlist
CONF=/etc/mt-daapd.conf
PLAY=/etc/mt-daapd.playlist
CACHE=/var/cache/mt-daapd
case "$1" in
configure)
if [ ! -d $CONFDIR ]; then mkdir -p $CONFDIR; fi
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
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
;;
esac