update
This commit is contained in:
17
isotest/stop.sh
Executable file
17
isotest/stop.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
|
||||
if [ -f "$SCRIPT_DIR/qemu.pid" ]; then
|
||||
PID=$(cat "$SCRIPT_DIR/qemu.pid")
|
||||
if kill -0 "$PID" 2>/dev/null; then
|
||||
echo "Stopping QEMU (PID: $PID)..."
|
||||
kill "$PID"
|
||||
sleep 1
|
||||
fi
|
||||
rm -f "$SCRIPT_DIR/qemu.pid"
|
||||
rm -f "$SCRIPT_DIR/qemu-monitor.sock"
|
||||
echo "QEMU stopped"
|
||||
else
|
||||
echo "QEMU not running (no PID file)"
|
||||
fi
|
||||
Reference in New Issue
Block a user