summaryrefslogtreecommitdiff
path: root/community/pound/pound.runit
blob: ae904583c5a1273d38d957d3148fc0d4943adea1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
exec 2>&1
# general config
. /etc/rc.conf
. /etc/rc.d/functions

BIN=/usr/bin/pound
OPTS="-f /etc/pound/pound.cfg -p /var/run/pound.pid"
SVC=pound

PID=`pidof $BIN`
if [ -z "$PID" ]
then
	if [ -f /var/run/$SVC.pid ]
	then
		rm /var/run/$SVC.pid
		rm_daemon $SVC
	fi
	echo "Starting $SVC daemon"
	$BIN $OPTS
else
	[ -z $PID ] || exec watchpid $PID
fi