6 # source application-specific settings
7 [ -f /etc
/conf.d
/privoxy
] && .
/etc
/conf.d
/privoxy
9 # read logdir and logfile from privoxy config
10 prld
=`grep ^logdir "$PRIVOXY_CONF" 2>/dev/null | cut -d' ' -f2`
11 [ -n "$prld" ] || prld
=/var
/log
/privoxy
12 prlf
=`grep ^logfile "$PRIVOXY_CONF" 2>/dev/null | cut -d' ' -f2`
13 [ -n "$prlf" ] || prlf
=logfile
15 PID
=`pidof -o %PPID /usr/sbin/privoxy`
19 stat_busy
"Starting Privoxy"
20 # create missing logdir and logfile
21 [ -d "$prld" ] || mkdir
-p "$prld"
22 if [ ! -f "$prlf" ]; then
23 touch "$prld/$prlf" && chgrp
"${PRIVOXY_GROUP}" "$prld/$prlf" && \
24 chmod 0660 "$prld/$prlf"
26 [ -z "$PID" ] && /usr
/sbin
/privoxy
--user ${PRIVOXY_USER}.
${PRIVOXY_GROUP} \
27 ${PRIVOXY_ARGS} ${PRIVOXY_CONF}
36 stat_busy
"Stopping Privoxy"
37 [ ! -z "$PID" ] && kill $PID &> /dev
/null
51 echo "usage: $0 {start|stop|restart}"