aboutsummaryrefslogtreecommitdiffstats
path: root/testing/runit/runit.initd
diff options
context:
space:
mode:
authorStuart Cardall <developer@it-offshore.co.uk>2015-07-23 23:31:42 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2015-07-27 08:48:06 +0000
commit8b3ae69651755379df2a5dd0382dab72d83287b0 (patch)
treeaf7fb075d0c560012e659c7ddbc68fea1c1e8805 /testing/runit/runit.initd
parentbadf4ed4af02a05ef9cfb19b8060d2918ae03f37 (diff)
downloadaports-8b3ae69651755379df2a5dd0382dab72d83287b0.tar.gz
aports-8b3ae69651755379df2a5dd0382dab72d83287b0.tar.bz2
aports-8b3ae69651755379df2a5dd0382dab72d83287b0.tar.xz
testing/runit: fix init script + doc typo
runit runs ok without a symlink to /etc/service in /run but without it sv commands do not work properly.
Diffstat (limited to 'testing/runit/runit.initd')
-rw-r--r--testing/runit/runit.initd9
1 files changed, 9 insertions, 0 deletions
diff --git a/testing/runit/runit.initd b/testing/runit/runit.initd
index 59fd4a4c9b..979b7c6bc5 100644
--- a/testing/runit/runit.initd
+++ b/testing/runit/runit.initd
@@ -2,6 +2,7 @@
command="/sbin/runsvdir"
command_args="/etc/service"
+rundir="/run/service"
pidfile="/run/${SVCNAME}.pid"
command_background="true"
description="starts and monitors a collection of runsv(8) processes"
@@ -9,4 +10,12 @@ retry="SIGHUP/5"
depend() {
need localmount
+ after firewall
}
+
+start_pre() {
+ if [ ! -L "$rundir" ]; then
+ rm -f $rundir && ln -s $command_args $rundir
+ fi
+}
+