From 018cee4d13bc670479131ae2167dad4824ab1c47 Mon Sep 17 00:00:00 2001 From: Ralph Ronnquist Date: Sun, 27 Mar 2022 10:09:21 +1100 Subject: [PATCH] stop services in reverse order --- overlay-stop | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) 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 <