commit 3f7dbd341e83469d9b7f2a7c1c529662b140412b Author: segler Date: Tue Aug 14 11:54:15 2012 +0000 initial git-svn-id: svn://svn.compuextreme.de/Viitor/V962/Viitor_squid@6309 504e572c-2e33-0410-9681-be2bf7408885 diff --git a/etc/init/squid.conf b/etc/init/squid.conf new file mode 100644 index 0000000..b800afd --- /dev/null +++ b/etc/init/squid.conf @@ -0,0 +1,24 @@ +description "Squid Proxy" +author "Michael Freitag " +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