SOURCES: varnish.init (NEW), varnish.sysconfig (NEW) - raw from sr...

glen glen at pld-linux.org
Mon Nov 27 00:41:11 CET 2006


Author: glen                         Date: Sun Nov 26 23:41:11 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- raw from src.rpm

---- Files affected:
SOURCES:
   varnish.init (NONE -> 1.1)  (NEW), varnish.sysconfig (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/varnish.init
diff -u /dev/null SOURCES/varnish.init:1.1
--- /dev/null	Mon Nov 27 00:41:11 2006
+++ SOURCES/varnish.init	Mon Nov 27 00:41:06 2006
@@ -0,0 +1,74 @@
+#! /bin/sh
+#
+# varnish	Control the varnish HTTP accelerator
+#
+# chkconfig: - 90 10
+# description: HTTP accelerator
+# processname: varnishd
+# config: /etc/varnish.conf
+# pidfile: /var/run/varnish/varnishd.pid
+
+# Source function library.
+. /etc/init.d/functions
+
+RETVAL=0
+PROCNAME=varnishd
+
+. /etc/sysconfig/varnish
+if [ "$DAEMON" = "" ]; then DAEMON="/usr/sbin/varnishd"; fi
+DAEMON_OPTS="-a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT} \
+		-h ${VARNISH_HASHOPTION} \
+		-f ${VARNISH_VCL_CONF} \
+		-T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} \
+		-t ${VARNISH_TTL} \
+		-w ${VARNISH_MIN_WORKER_THREADS},${VARNISH_MAX_WORKER_THREADS},${VARNISH_WORKER_THREAD_TIMEOUT} \
+		-s ${VARNISH_BACKEND_STORAGE}"	
+
+
+mkdir -p /var/run/varnish 2>/dev/null
+
+# See how we were called.
+case "$1" in
+  start)
+	echo -n "Starting varnish HTTP accelerator: "
+	daemon $DAEMON "$DAEMON_OPTS"
+	sleep 1
+	pkill -0 $PROCNAME
+	RETVAL=$?
+	if [ $RETVAL -eq 0 ]
+	then
+		echo_success
+		touch /var/lock/subsys/varnishd
+	else
+		echo_failure
+	fi
+	echo
+	;;
+  stop)
+	echo -n "Stopping varnish HTTP accelerator: "
+	killproc $DAEMON
+	RETVAL=$?
+	if [ $RETVAL -eq 0 ]
+	then
+		echo_success
+		rm -f /var/lock/subsys/varnishd
+	else
+		echo_failure
+	fi
+	echo
+	;;
+  status)
+	status $PROCNAME
+	RETVAL=$?
+	;;
+  restart|reload)
+  	$0 stop
+	$0 start
+	RETVAL=$?
+	;;
+  *)
+	echo "Usage: $0 {start|stop|status|restart}"
+	exit 1
+esac
+
+exit $RETVAL

================================================================
Index: SOURCES/varnish.sysconfig
diff -u /dev/null SOURCES/varnish.sysconfig:1.1
--- /dev/null	Mon Nov 27 00:41:11 2006
+++ SOURCES/varnish.sysconfig	Mon Nov 27 00:41:06 2006
@@ -0,0 +1,51 @@
+#
+# Default variables for varnish
+#
+
+# The main daemon binary
+VARNISHD=/usr/sbin/varnish
+
+# VCL Configuration file. This is the "main configuration file"
+VARNISH_VCL_CONF=/etc/varnish/vcl.conf
+
+
+# Default address and port to bind to. 
+# To make varnish accept normal http traffic,
+# change the listen port to 80
+VARNISH_LISTEN_ADDRESS=0.0.0.0
+VARNISH_LISTEN_PORT=6081
+
+
+# Telnet admin interface listen address and port
+VARNISH_ADMIN_LISTEN_ADDRESS=127.0.0.1
+VARNISH_ADMIN_LISTEN_PORT=6082
+
+
+# The minimum number of threads to start
+VARNISH_MIN_WORKER_THREADS=1
+
+
+# Maximum number of worker threads or INF for unlimited
+VARNISH_MAX_WORKER_THREADS=INF
+
+
+# Timeout value in seconds for threads to return
+VARNISH_WORKER_THREAD_TIMEOUT=10 
+
+
+# Hash algorithm to be used
+VARNISH_HASHOPTION=classic
+
+
+# Maximum size of the backend storagefile in bytes
+VARNISH_BACKEND_STORAGE_SIZE=10240000
+VARNISH_BACKEND_STORAGE_FILE=/var/lib/varnish/varnish_storage.bin
+
+
+# Backend storage specification
+VARNISH_BACKEND_STORAGE="file,${VARNISH_BACKEND_STORAGE_FILE},${VARNISH_BACKEND_STORAGE_SIZE}"
+
+
+# Set default ttl in secounds
+VARNISH_TTL=120
+
================================================================


More information about the pld-cvs-commit mailing list