From: Ralph Ronnquist Date: Sat, 26 Mar 2022 23:09:21 +0000 (+1100) Subject: stop services in reverse order X-Git-Tag: deb_0.1~1 X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;h=018cee4d13bc670479131ae2167dad4824ab1c47;p=rrq%2Foverlay-boot.git stop services in reverse order --- diff --git a/overlay-stop b/overlay-stop index d1e89ac..82961ec 100755 --- a/overlay-stop +++ b/overlay-stop @@ -2,12 +2,17 @@ # # Script to stop the nominated overlay subhost +OVERLAYDIR="$(dirname $(realpath $0))" + [ $(id -u) = 0 ] || exec sudo $0 $@ -. $(dirname $(realpath $0))/functions XXX +. $OVERLAYDIR/functions $* -NAME="$1" +CONFIG="$1" +[ -r "$CONFIG" ] || die "Missing configuration $CONFIG" -[ -z "$NAME" ] && echo "Select subhost: $(list_running)" && exit 0 +config NAME $(basename $1 .${1##*.}) +config START "ssh networking" +config LIVE read USPID RSPID <