From c7799b3e912c898abaca93afc770af9f949ba88a Mon Sep 17 00:00:00 2001 From: Marvin Stark Date: Tue, 14 Nov 2006 17:13:11 +0100 Subject: Import Debian changes 1.19-3~bpo.1 mini-httpd (1.19-3~bpo.1) sarge-backports; urgency=low * Rebuilt for sarge. mini-httpd (1.19-3) unstable; urgency=low * Pidfile will be removed, if mini-http gets removed or stopped (Closes: #387941). * Changed start behavior of mini-httpd. --- debian/changelog | 13 +++++++++++++ debian/mini-httpd.default | 2 +- debian/mini-httpd.init.d | 19 ++++++++++++++++++- 3 files changed, 32 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 8133d41..e803b57 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,16 @@ +mini-httpd (1.19-3~bpo.1) sarge-backports; urgency=low + + * Rebuilt for sarge. + + -- Marvin Stark Tue, 14 Nov 2006 17:13:11 +0100 + +mini-httpd (1.19-3) unstable; urgency=low + + * Pidfile will be removed, if mini-http gets removed or stopped (Closes: #387941). + * Changed start behavior of mini-httpd. + + -- Marvin Stark Wed, 25 Oct 2006 21:47:43 +0200 + mini-httpd (1.19-2) unstable; urgency=low * Resolved conflicts with apache2-utils (Closes: #385268). diff --git a/debian/mini-httpd.default b/debian/mini-httpd.default index 93c3bda..2ac10e4 100644 --- a/debian/mini-httpd.default +++ b/debian/mini-httpd.default @@ -2,7 +2,7 @@ # Author: Marvin Stark # Start daemon? -START=0 +START=1 # Additional options that are passed to the Daemon. DAEMON_OPTS="-C /etc/mini-httpd.conf" diff --git a/debian/mini-httpd.init.d b/debian/mini-httpd.init.d index d1e4a3f..a852d83 100644 --- a/debian/mini-httpd.init.d +++ b/debian/mini-httpd.init.d @@ -33,12 +33,29 @@ case "$1" in start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ --exec $DAEMON -- $DAEMON_OPTS echo "$NAME." + else + echo -e "You have to edit /etc/mini-httpd.conf and\n/etc/default/mini-httpd before running mini-httpd!" + exit 0 fi ;; stop) echo -n "Stopping $DESC: " - start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid + # Get pid number + if [ -e /var/run/$NAME.pid ] + then + PID=`cat /var/run/$NAME.pid` + if [ -d /proc/$PID ] + then + start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid + else + # we need to remove the pidfile manually + if [ -e /var/run/$NAME.pid ] + then + rm -f /var/run/$NAME.pid + fi + fi + fi echo "$NAME." ;; -- cgit v1.2.3