summaryrefslogtreecommitdiff
path: root/postinst-runit
diff options
context:
space:
mode:
Diffstat (limited to 'postinst-runit')
-rw-r--r--postinst-runit23
1 files changed, 23 insertions, 0 deletions
diff --git a/postinst-runit b/postinst-runit
index e69de29..3a51832 100644
--- a/postinst-runit
+++ b/postinst-runit
@@ -0,0 +1,23 @@
1SV_ABS_DIR=/var/lib/runit/service
2SV_DIR=/etc/service
3mkdir -p "$SV_ABS_DIR"
4if [ ! -e "$SV_DIR" ] ; then
5 ln -s "$SV_ABS_DIR" "$SV_DIR"
6fi
7
8if [ "$(readlink -f "$SV_DIR")" != "$SV_ABS_DIR" ] ; then
9 cat <<EOF
10Service directory '$SV_DIR' exists, but is not symbolic link
11to '$SV_ABS_DIR'. It probably means that it was created by
12hand or versions of runit below 2.1.2-4.
13
14In either case, please remove service directory yourself and
15restart installation.
16EOF
17 exit 1
18fi
19NAME=#NAME#
20ln -s "/etc/sv/$NAME" "$SV_DIR/$NAME"
21
22
23