reset-failed state of tasks during startup

This commit is contained in:
Girish Ramakrishnan
2020-08-07 22:41:09 -07:00
parent 5073809486
commit 60b3fceea6

View File

@@ -22,6 +22,7 @@ task_id="$1"
if [[ "${task_id}" == "all" ]]; then
systemctl list-units --full --no-legend cloudron-task-* # just to show who was running
systemctl kill --signal=SIGTERM cloudron-task-* || true
systemctl reset-failed cloudron-task-* || true
else
readonly service_name="cloudron-task-${task_id}"
systemctl kill --signal=SIGTERM "${service_name}" || true