aboutsummaryrefslogtreecommitdiff
path: root/src/pound/pound.runit
diff options
context:
space:
mode:
Diffstat (limited to 'src/pound/pound.runit')
-rwxr-xr-xsrc/pound/pound.runit23
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