From 2b93d3ff98d2cd41c7e148c20ed5b8e5271235fb Mon Sep 17 00:00:00 2001 From: Billie Ponder Date: Mon, 21 Sep 2026 11:16:13 -0400 Subject: [PATCH] fix(ops): remove .service suffix from systemctl commands in helper script (#20) Co-authored-by: Developer --- backend/motorsignal_api/scripts/ops-action-helper.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/motorsignal_api/scripts/ops-action-helper.sh b/backend/motorsignal_api/scripts/ops-action-helper.sh index f984ea5..f2204ab 100644 --- a/backend/motorsignal_api/scripts/ops-action-helper.sh +++ b/backend/motorsignal_api/scripts/ops-action-helper.sh @@ -20,9 +20,9 @@ PUBLIC_WEBSITE_URL="https://motorsignal.app/api/version" INTERNAL_API_URL="http://127.0.0.1:8080/api/v1/health" restart_website_service() { - if sudo -n systemctl restart motorsignal-website.service >/dev/null 2>&1; then + if sudo -n systemctl restart motorsignal-website >/dev/null 2>&1; then return 0 - elif systemctl restart motorsignal-website.service >/dev/null 2>&1; then + elif systemctl restart motorsignal-website >/dev/null 2>&1; then return 0 else return 1 @@ -113,11 +113,11 @@ case "$ACTION" in echo ">>> [OPS-HELPER] Scheduling detached API restart..." systemd-run --unit="motorsignal-api-restart-$(date +%s)" \ --description="MotorSignal API Delayed Restart" \ - bash -c 'sleep 2; systemctl restart motorsignal-api.service' >/dev/null 2>&1 || \ + bash -c 'sleep 2; systemctl restart motorsignal-api' >/dev/null 2>&1 || \ sudo -n systemd-run --unit="motorsignal-api-restart-$(date +%s)" \ --description="MotorSignal API Delayed Restart" \ - bash -c 'sleep 2; systemctl restart motorsignal-api.service' >/dev/null 2>&1 || \ - (nohup bash -c 'sleep 2; sudo -n systemctl restart motorsignal-api.service || systemctl restart motorsignal-api.service' >/dev/null 2>&1 &) + bash -c 'sleep 2; systemctl restart motorsignal-api' >/dev/null 2>&1 || \ + (nohup bash -c 'sleep 2; sudo -n systemctl restart motorsignal-api || systemctl restart motorsignal-api' >/dev/null 2>&1 &) echo '{"status":"running","status_message":"motorsignal-api restart initiated; process will cycle momentarily."}' exit 0