1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-17 12:53:54 +02:00
openwrt-packages/net/privoxy/files/privoxy.hotplug
Christian Schoenebeck ba929dd1f7 privoxy: bump to version 3.0.24
* upstream to Privoxy 3.0.24
* add facility to set compile options
* add file list to be saved on sysupgrade
* fixed PKG_MAINTAINER string
* add port 8118 used by privoxy to /etc/services
* new "boot_delay" option (default 10 seconds) to wait for interfaces to come up before hotplug restarts are enabled

Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
2016-02-07 21:52:02 +01:00

21 lines
518 B
Bash

#!/bin/sh
# only (re-)start on ifup
[ "$ACTION" = "ifup" ] || exit 0
# only start if boot_delay is done
[ -f /tmp/privoxy.hotplug ] || 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