summaryrefslogtreecommitdiff
path: root/community/pound/pound.runit
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/pound/pound.runit
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/pound/pound.runit')
-rwxr-xr-xcommunity/pound/pound.runit24
1 files changed, 24 insertions, 0 deletions
diff --git a/community/pound/pound.runit b/community/pound/pound.runit
new file mode 100755
index 000000000..2e0be991e
--- /dev/null
+++ b/community/pound/pound.runit
@@ -0,0 +1,24 @@
+#!/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
+