5 # Required-Start: $local_fs $remote_fs $network $time
6 # Required-Stop: $local_fs $remote_fs $network $time
7 # Default-Start: 2 3 4 5
9 # Short-Description: Privacy enhancing HTTP Proxy
10 # Description: Privoxy is a web proxy with advanced filtering
11 # capabilities for protecting privacy, filtering
12 # web page content, managing cookies, controlling
13 # access, and removing ads, banners, pop-ups and
14 # other obnoxious Internet junk.
17 PATH=/sbin:/bin:/usr/sbin:/usr/bin
18 DAEMON=/usr/sbin/privoxy
20 DESC="filtering proxy server"
22 CONFIGFILE=/etc/privoxy/config
23 PIDFILE=/var/run/$NAME.pid
25 test -f $DAEMON || exit 0
31 echo -n "Starting $DESC: "
32 start-stop-daemon --oknodo --start --quiet --pidfile $PIDFILE \
33 --exec $DAEMON -- --pidfile $PIDFILE --user $OWNER $CONFIGFILE \
34 2>> /var/log/privoxy/errorfile
39 echo -n "Stopping $DESC: "
40 start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE \
47 echo -n "Restarting $DESC: "
48 start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE \
51 start-stop-daemon --oknodo --start --quiet --pidfile $PIDFILE \
52 --exec $DAEMON -- --pidfile $PIDFILE --user $OWNER $CONFIGFILE \
53 2>> /var/log/privoxy/errorfile
58 echo -n "Status of $DESC: "
59 if [ ! -r "$PIDFILE" ]; then
60 echo "$NAME is not running."
63 if read pid < "$PIDFILE" && ps -p "$pid" > /dev/null 2>&1; then
64 echo "$NAME is running."
67 echo "$NAME is not running but $PIDFILE exists."
74 echo "Usage: $N {start|stop|restart|force-reload|status}" >&2