X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=blobdiff_plain;f=net%2Fprivoxy%2Ffiles%2Fprivoxy.init;h=46a46c7f3c3bb20a207ee9b055fe71ee330c2f3d;hp=7c9e018bee060b596e211d4885f1e4ad57962f1d;hb=402bb8c802c78ea538ffe8c9f71268aac90fcd40;hpb=c45ce35a2583177602c229dd6b468729f6d99c38;ds=sidebyside diff --git a/net/privoxy/files/privoxy.init b/net/privoxy/files/privoxy.init index 7c9e018bee..46a46c7f3c 100644 --- a/net/privoxy/files/privoxy.init +++ b/net/privoxy/files/privoxy.init @@ -1,11 +1,15 @@ #!/bin/sh /etc/rc.common # Copyright (C) 2006 OpenWrt.org -conf=/etc/privoxy/config + +CFG_F=/etc/privoxy/config +RUN_D=/var/run +PID_F=$RUN_D/privoxy.pid start() { - /usr/sbin/privoxy $conf + mkdir -p $RUN_D + /usr/sbin/privoxy --pidfile $PID_F $CFG_F } stop() { - killall privoxy + [ -f $PID_F ] && kill $(cat $PID_F) }