From: Roland Rosenfeld <roland@spinnaker.de>
Date: Fri, 6 Sep 2002 16:14:30 +0000 (+0000)
Subject:   * Use start-stop-daemon for starting privoxy to avoid problems on start,
X-Git-Tag: v_3_1_archive_branchpoint~144
X-Git-Url: http://www.privoxy.org/gitweb/@default-cgi@/faq/%22https:/@protocol@@hostport@@force-prefix@@path@?a=commitdiff_plain;h=114c72fda4a6df07cd8a067a8fbafacaa3730c71;p=privoxy.git

  * Use start-stop-daemon for starting privoxy to avoid problems on start,
    when privoxy is already running (Closes: #154882).
---

diff --git a/debian/init.d b/debian/init.d
index cca3a8be..012668da 100644
--- a/debian/init.d
+++ b/debian/init.d
@@ -15,8 +15,10 @@ set -e
 case "$1" in
   start)
 	echo -n "Starting $DESC: "
-	$DAEMON --pidfile $PIDFILE --user $OWNER $CONFIGFILE 2>/dev/null
-	echo "$NAME."
+	start-stop-daemon --oknodo --start --quiet --pidfile $PIDFILE \
+	    --exec $DAEMON -- --pidfile $PIDFILE --user $OWNER $CONFIGFILE \
+	    2>/dev/null
+ 	echo "$NAME."
 	;;
   stop)
 	echo -n "Stopping $DESC: "
@@ -46,7 +48,8 @@ case "$1" in
 	start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE \
 		--exec $DAEMON
 	sleep 1
-	$DAEMON --pidfile $PIDFILE --user $OWNER $CONFIGFILE
+	start-stop-daemon --oknodo --start --quiet --pidfile $PIDFILE \
+	    --exec $DAEMON -- --pidfile $PIDFILE --user $OWNER $CONFIGFILE
 	;;
   *)
 	N=/etc/init.d/$NAME