3 # only (re-)start on ifup
4 [ "$ACTION" = "ifup" ] || exit 0
5 # only start if boot_delay is done
6 [ -f /tmp/privoxy.hotplug ] || exit 0
8 PIDFILE=/var/run/privoxy.pid
10 _PID=$(cat $PIDFILE 2>/dev/null)
11 kill -1 $_PID 2>/dev/null
13 # only restart if already running
14 logger -p daemon.info -t "privoxy[$_PID]" \
15 "Restart request due to '$ACTION' of interface '$INTERFACE'"
16 /etc/init.d/privoxy restart
18 # only start if enabled
19 /etc/init.d/privoxy enabled && /etc/init.d/privoxy start