diff options
Diffstat (limited to 'src/pound/pound.runit')
-rwxr-xr-x | src/pound/pound.runit | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/pound/pound.runit b/src/pound/pound.runit new file mode 100755 index 0000000..ed59ea0 --- /dev/null +++ b/src/pound/pound.runit @@ -0,0 +1,23 @@ +#!/bin/sh +exec 2>&1 +# general config +. /etc/rc.conf +. /etc/rc.d/functions + +BIN=/usr/sbin/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 |