fix: Shutdown message

* fix: Shutdown message
This commit is contained in:
Kroese 2023-12-28 05:26:53 +01:00 committed by GitHub
parent 159fce6839
commit 69e785e6ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,7 +35,7 @@ finish() {
if [ -f "$QEMU_PID" ]; then if [ -f "$QEMU_PID" ]; then
pid="$(cat "$QEMU_PID")" pid="$(cat "$QEMU_PID")"
echo && error "Forcefully quitting QEMU process, reason: $reason..." echo && error "Forcefully terminating QEMU process, reason: $reason..."
{ kill -15 "$pid" || true; } 2>/dev/null { kill -15 "$pid" || true; } 2>/dev/null
while isAlive "$pid"; do while isAlive "$pid"; do
@ -51,7 +51,7 @@ finish() {
closeNetwork closeNetwork
sleep 1 sleep 1
echo && info "Shutdown completed!" echo && echo " Shutdown completed!"
exit "$reason" exit "$reason"
} }
@ -98,7 +98,7 @@ _graceful_shutdown() {
response="${response#*message\"\: \"}" response="${response#*message\"\: \"}"
[ -z "$response" ] && response="second signal" [ -z "$response" ] && response="second signal"
echo && error "Forcefully quitting because of: ${response%%\"*}" echo && error "Forcefully terminating because of: ${response%%\"*}"
{ kill -15 "$pid" || true; } 2>/dev/null { kill -15 "$pid" || true; } 2>/dev/null
fi fi