fix(ops): remove .service suffix from systemctl commands in helper script (#20)
Co-authored-by: Developer <dev@example.com>
This commit is contained in:
parent
10d6260393
commit
2b93d3ff98
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue