fix: Detect device

* fix: Detect device
This commit is contained in:
Kroese
2023-12-28 05:04:40 +01:00
committed by GitHub
parent 08e4084458
commit 159fce6839
2 changed files with 23 additions and 6 deletions

View File

@@ -61,10 +61,14 @@ _graceful_shutdown() {
local code=$?
local pid cnt response
[ -f "$QEMU_COUNT" ] && return
echo 0 > "$QEMU_COUNT"
set +e
if [ -f "$QEMU_COUNT" ]; then
echo && info "Ignored $1 signal, already shutting down..."
return
fi
echo 0 > "$QEMU_COUNT"
echo && info "Received $1 signal, sending shutdown command..."
if [ ! -f "$QEMU_PID" ]; then