]> err.no Git - varnish/commitdiff
Debian packaging: Disable running of varnishlog by default
authorssm <ssm@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 20 Feb 2008 12:02:07 +0000 (12:02 +0000)
committerssm <ssm@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 20 Feb 2008 12:02:07 +0000 (12:02 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2520 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/debian/varnish.default
varnish-cache/debian/varnish.varnishlog.init

index 441fdc180d3e12f33894267646fde267ee1b14ef..1c08d8ca7b173fa6be742b7f8323f28ac2ffe7f9 100644 (file)
@@ -11,6 +11,10 @@ NFILES=131072
 # the -n switch, to have more instances on a single server.
 INSTANCE=$(uname -n)
 
+# Uncomment this to enable varnishlog.  Please sure you have enough disk space
+# for significant amounts of log data.
+# VARNISHLOG_ENABLE=1
+
 # This file contains 4 alternatives, please use only one.
 
 ## Alternative 1, Minimal configuration, no VCL
index 5fd6f25647c482b48434cf68a6a408ad423a69ce..ba02a63061f7a3e4175c6f0656ffb189afcbcc87 100755 (executable)
@@ -22,6 +22,16 @@ DAEMON=/usr/bin/$NAME
 PIDFILE=/var/run/$NAME.pid
 LOGFILE=/var/log/varnish/varnish.log
 
+# Include varnish defaults if available
+if [ -f /etc/default/varnish ] ; then
+        . /etc/default/varnish
+fi
+
+# If unset or not 1, exit
+if [ -z "${VARNISHLOG_ENABLED}" -o "${VARNISHLOG_ENABLED}" -ne "1" ]; then
+  exit 0;
+fi
+
 test -x $DAEMON || exit 0
 
 DAEMON_OPTS="-a -w ${LOGFILE} -D -P $PIDFILE"