3 # Script to stop the nominated overlay subhost
5 [ $(id -u) = 0 ] || exec sudo $0 $@
6 . $(dirname $(realpath $0))/functions XXX
10 read USPID RSPID <<EOF
14 [ -z "$USPID" ] && echo "$NAME i snot running" >&2 && exit 1
16 if [ -z "$RSPID" ] ; then
18 *** $NAME is started (pid $USPID) but doesn't seem to be running
19 *** /.reaper and might need manual fixing.
24 CHILDPIDS="$(nsenter -t $RSPID -p -m ps -hopid --ppid 1)"
25 nsenter -t $RSPID -p -m kill $CHILDPIDS