summaryrefslogtreecommitdiff
path: root/package/squid/files/squid.init
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2009-11-29 19:45:19 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2009-11-29 19:45:19 +0100
commitb3a54c520195f3cab1109cb90de8179e4dff433f (patch)
tree6728c4cdb14fd18a6b7c040c7d395a2d5603fc74 /package/squid/files/squid.init
parent81b38e16646cc758202b51b5174da63e2e09646a (diff)
add bridging firewall stuff
- tested with a transparent squid proxy - fix some minor other stuff - not completely ready
Diffstat (limited to 'package/squid/files/squid.init')
-rw-r--r--package/squid/files/squid.init37
1 files changed, 37 insertions, 0 deletions
diff --git a/package/squid/files/squid.init b/package/squid/files/squid.init
new file mode 100644
index 000000000..5fd8e4c13
--- /dev/null
+++ b/package/squid/files/squid.init
@@ -0,0 +1,37 @@
+#!/bin/sh
+#PKG squid
+#INIT 70
+
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+ test x"${squid:-NO}" = x"NO" && exit 0
+ exec sh $0 start
+ ;;
+start)
+ if [ ! -f /var/log/squid-cache.log ];then
+ touch /var/log/squid-cache.log
+ chown squid:squid /var/log/squid-cache.log
+ fi
+ if [ ! -d /var/squid/cache ];then
+ mkdir -p /var/squid/cache
+ chown squid:squid /var/squid/cache
+ squid -z
+ fi
+ squid
+ ;;
+stop)
+ squid -k kill
+ ;;
+restart)
+ sh $0 stop
+ sh $0 start
+ ;;
+
+*)
+ echo "usage: $0 {start | stop | restart}"
+ exit 1
+esac
+exit $?