6 PID
=$
(pidof
-o %PPID
/usr
/sbin
/adsuck
)
7 PARAM
="-c /var/adsuck -f /resolv.conf /hosts -r /filter"
11 stat_busy
"Starting Adsuck Daemon"
13 if [[ -z $PID ]] && /usr
/sbin
/adsuck
$PARAM; then
14 PID
=$
(pidof
-o %PPID
/usr
/sbin
/adsuck
)
15 echo "$PID" > /var
/run
/adsuck.pid
24 stat_busy
"Stopping Adsuck Daemon"
25 if [[ ! -z $PID ]] && kill "$PID" &>/dev
/null
; then
34 stat_busy
"Reloading configuration"
35 kill -HUP "$PID" # reload resolv.conf
36 kill -USR1 "$PID" # reload regex and hostfile
44 echo "Usage: $0 {start|stop|reload|restart}" >&2