Viitor_squid/etc/init/squid.conf

25 lines
485 B
SquidConf
Raw Normal View History

description "Squid Proxy"
author "Michael Freitag <Michael.Freitag@freitag-it.de>"
version 1.0
emits none special
start on (runlevel [2345] and (started ifup))
stop on runlevel [016]
console none
expect fork
pre-start script
CACHE_DIR=`awk '/^#/ { next; } /cache_dir/ { print $3; };' /etc/squid/squid.conf`
if [ "x${CACHE_DIR}x" != "xx" ]; then
/opt/squid/sbin/squid -z
fi
end script
post-stop script
kill `pidof \(squid\)`
end script
exec /opt/squid/sbin/squid