X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=local%2Frunit-sv-start;fp=local%2Frunit-sv-start;h=e4b83323d77aff5d678a396eed4293c36999b2fd;hb=3ad6118386977e346d81042e924e5db9c5f15b7d;hp=0000000000000000000000000000000000000000;hpb=22f04b9fac14adc3d3fc98273ba126c3a51792c3;p=lhc%2Fateliers.git diff --git a/local/runit-sv-start b/local/runit-sv-start new file mode 100755 index 0000000..e4b8332 --- /dev/null +++ b/local/runit-sv-start @@ -0,0 +1,13 @@ +#!/bin/sh -eu +# SYNTAX: $sv +tool=$(readlink -e "${0%/*}/..") +. "$tool"/local/lib.sh + +sv="$1" +while true + do case $(sudo sv start "$sv" | tee /dev/stderr) in + (*": runsv not running") sleep 1;; + (*": unable to open supervise/ok: file does not exist") sleep 1;; + (*) break;; + esac + done