#!/sbin/runscript # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 CONFDIR=/etc/privoxy PIDFILE=/var/run/privoxy depend() { need net } start() { if [ ! -f "${CONFDIR}/config-1" ]; then eerror "Configuration file in ${CONFDIR} not found!" return 1 fi for i in {1,2,3,4,5,6,7,8}; do ebegin "Starting privoxy-$i" start-stop-daemon --start --exec /usr/sbin/privoxy --pidfile ${PIDFILE}-$i.pid -- --pidfile "${PIDFILE}-$i.pid" --user privoxy.privoxy "${CONFDIR}/config-$i" eend $?; done ebegin "Starting squid" /usr/sbin/squid -f /etc/squid/squid-in.conf -DYC eend $? } stop() { ebegin "Stopping privoxy" /usr/bin/killall privoxy eend $?; ebegin "Deleting not killed pid-Files!" /bin/rm /var/run/privoxy-*.pid eend $?; ebegin "Stopping squid" /usr/bin/killall squid eend $? }