From 91da1a4c58c53e89f17004507c23f7ab7df690a3 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Sat, 25 Oct 2025 18:34:06 -0700 Subject: [PATCH] Update update.sh --- update.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/update.sh b/update.sh index 51caad7..bdade54 100644 --- a/update.sh +++ b/update.sh @@ -81,14 +81,14 @@ else echo "Configuration merge log (ini_merge_log.txt) not found. check out the script/configMerge.py tool!" fi -# if service was stopped earlier, restart it if [[ "$service_stopped" = true ]]; then echo "Restarting services..." - systemctl start mesh_bot.service - systemctl start pong_bot.service - systemctl start mesh_bot_reporting.service - systemctl start mesh_bot_w3.service - echo "Services restarted." + for svc in mesh_bot.service pong_bot.service mesh_bot_reporting.service mesh_bot_w3.service; do + if systemctl list-unit-files | grep -q "^$svc"; then + systemctl start "$svc" + echo "$svc restarted." + fi + done fi # Print completion message