mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
[privoxy] remove using procd
* go back to "old" initscript not using procd
* privoxy running --no-daemon only logging to STDERR
* procd do not support redirection of STDOUT/STDERR, '2>file' as a command parameter does not work
Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user