You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

18 lines
445 B

#!/bin/sh
# only (re-)start on ifup
[ "$ACTION" = "ifup" ] || exit 0
PIDFILE=/var/run/privoxy.pid
_PID=$(cat $PIDFILE 2>/dev/null)
kill -1 $_PID 2>/dev/null
if [ $? -eq 0 ]; then
# only restart if already running
logger -p daemon.info -t "privoxy[$_PID]" \
"Restart request due to '$ACTION' of interface '$INTERFACE'"
/etc/init.d/privoxy restart
else
# only start if enabled
/etc/init.d/privoxy enabled && /etc/init.d/privoxy start
fi