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

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