From 1223db6d637b9dc74a1b3371a9a5289a2ec818b6 Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Mon, 5 Sep 2016 22:05:00 +0200 Subject: add xmksv --- xmksv | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 xmksv (limited to 'xmksv') diff --git a/xmksv b/xmksv new file mode 100755 index 0000000..619ba26 --- /dev/null +++ b/xmksv @@ -0,0 +1,14 @@ +#!/bin/sh -e +# xmksv [NEWSVDIR...] - create new runit service templates + +cd ${SVDIR:-/etc/sv} + +for SRV; do + mkdir "$SRV" + touch "$SRV/down" + echo "#!/bin/sh" | install -m755 /dev/stdin "$SRV/run" + if [ -w /run/runit ]; then + ln -s /run/runit/supervise."$(printf %s "$SRV" | tr / -)" \ + "$SRV/supervise" + fi +done -- cgit 1.4.1