updated on Wed Jan 11 00:07:16 UTC 2012
[aur-mirror.git] / varnish / varnish.runit
blobe9e647f8fc6730ea0ec3ff39df8cb363af8dab4c
1 #!/bin/bash
3 # general config
4 . /etc/rc.conf
5 . /etc/rc.d/functions
7 . /etc/varnish.conf
9 BIN="/usr/sbin/varnishd"
11 PID=`pidof %PPID $BIN`
13 killjobs () {
14 kill $PID >&/dev/null
17 trap killjobs INT QUIT TERM EXIT KILL HUP
19 if [ -z "$PID" ]
20 then
21 $BIN $OPTS
22 else
23 for P in $PID
24 do
25 watchpid $P &
26 done
28 wait