Fix start/stop task scripts for ubuntu 16

This commit is contained in:
Girish Ramakrishnan
2020-08-08 11:10:02 -07:00
parent 1f1c94de70
commit da72597dd3
2 changed files with 27 additions and 14 deletions

View File

@@ -23,8 +23,10 @@ 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
systemctl stop cloudron-task-* || true # because of remain-after-exit in Ubuntu 16 we have to deactivate the service
else
readonly service_name="cloudron-task-${task_id}"
systemctl kill --signal=SIGTERM "${service_name}" || true
systemctl stop "${service_name}" || true # because of remain-after-exit in Ubuntu 16 we have to deactivate the service
fi