You've already forked Atomcms-edit
fix: use systemctl cat instead of list-units for reliable service detection
This commit is contained in:
Executable → Regular
+3
-3
@@ -198,7 +198,7 @@ fi
|
|||||||
# ----------------------------------------
|
# ----------------------------------------
|
||||||
# 7. Restart the Service
|
# 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..."
|
echo "--> Restarting $EMULATOR_SERVICE service..."
|
||||||
if command -v sudo &> /dev/null; then
|
if command -v sudo &> /dev/null; then
|
||||||
sudo systemctl restart "$EMULATOR_SERVICE"
|
sudo systemctl restart "$EMULATOR_SERVICE"
|
||||||
@@ -220,7 +220,7 @@ echo "--> Running extra validation..."
|
|||||||
ERRORS=0
|
ERRORS=0
|
||||||
|
|
||||||
# Check build output exists
|
# 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"
|
echo "--> [OK] Nitro-V3 build assets found"
|
||||||
else
|
else
|
||||||
echo "--> [FAIL] Nitro-V3 build assets missing!"
|
echo "--> [FAIL] Nitro-V3 build assets missing!"
|
||||||
@@ -242,7 +242,7 @@ for dir in "$NITRO_CLIENT" "$NITRO_RENDERER" "$EMULATOR_DIR" "$GAMEDATA_CONF_DIR
|
|||||||
done
|
done
|
||||||
|
|
||||||
# Check if emulator service is running
|
# 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")
|
SERVICE_STATUS=$(systemctl is-active "$EMULATOR_SERVICE" 2>/dev/null || echo "unknown")
|
||||||
if [ "$SERVICE_STATUS" = "active" ]; then
|
if [ "$SERVICE_STATUS" = "active" ]; then
|
||||||
echo "--> [OK] $EMULATOR_SERVICE service is $SERVICE_STATUS"
|
echo "--> [OK] $EMULATOR_SERVICE service is $SERVICE_STATUS"
|
||||||
|
|||||||
Reference in New Issue
Block a user