From 564215c94209a0187556e87c39a878f509049081 Mon Sep 17 00:00:00 2001 From: Ron Pedde Date: Mon, 14 Feb 2005 01:32:22 +0000 Subject: [PATCH] Debian package fixes --- debian/init.d | 6 +++--- debian/postinst | 15 +++++++++++---- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/debian/init.d b/debian/init.d index 6d774934..0ce0620c 100644 --- a/debian/init.d +++ b/debian/init.d @@ -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 diff --git a/debian/postinst b/debian/postinst index 33f28498..260e994d 100644 --- a/debian/postinst +++ b/debian/postinst @@ -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 + + +