From 434f58d5aa5a3f8d2b380c7a6f9d386aa0decf9f Mon Sep 17 00:00:00 2001 From: root Date: Sat, 6 Jun 2026 16:24:44 +0200 Subject: [PATCH] fix: use systemctl cat instead of list-units for reliable service detection --- app/Filament/Pages/Monitoring/Commandocentrum.php | 0 update-Nitrov3.sh | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) mode change 100755 => 100644 app/Filament/Pages/Monitoring/Commandocentrum.php diff --git a/app/Filament/Pages/Monitoring/Commandocentrum.php b/app/Filament/Pages/Monitoring/Commandocentrum.php old mode 100755 new mode 100644 diff --git a/update-Nitrov3.sh b/update-Nitrov3.sh index a696108..0a0e8fb 100755 --- a/update-Nitrov3.sh +++ b/update-Nitrov3.sh @@ -198,7 +198,7 @@ fi # ---------------------------------------- # 7. Restart the Service # ---------------------------------------- -if systemctl list-units --type=service --all 2>/dev/null | grep -q "$EMULATOR_SERVICE.service"; then +if systemctl cat "$EMULATOR_SERVICE" &>/dev/null; then echo "--> Restarting $EMULATOR_SERVICE service..." if command -v sudo &> /dev/null; then sudo systemctl restart "$EMULATOR_SERVICE" @@ -220,7 +220,7 @@ echo "--> Running extra validation..." ERRORS=0 # Check build output exists -if [ -d "$NITRO_CLIENT/public/assets" ]; then +if [ -d "$NITRO_CLIENT/dist/assets" ]; then echo "--> [OK] Nitro-V3 build assets found" else echo "--> [FAIL] Nitro-V3 build assets missing!" @@ -242,7 +242,7 @@ for dir in "$NITRO_CLIENT" "$NITRO_RENDERER" "$EMULATOR_DIR" "$GAMEDATA_CONF_DIR done # Check if emulator service is running -if systemctl list-units --type=service --all 2>/dev/null | grep -q "$EMULATOR_SERVICE.service"; then +if systemctl cat "$EMULATOR_SERVICE" &>/dev/null; then SERVICE_STATUS=$(systemctl is-active "$EMULATOR_SERVICE" 2>/dev/null || echo "unknown") if [ "$SERVICE_STATUS" = "active" ]; then echo "--> [OK] $EMULATOR_SERVICE service is $SERVICE_STATUS"