diff --git a/src/scripts/stoptask.sh b/src/scripts/stoptask.sh index afc714a3f..6254e129d 100755 --- a/src/scripts/stoptask.sh +++ b/src/scripts/stoptask.sh @@ -22,7 +22,7 @@ task_id="$1" if [[ "${task_id}" == "all" ]]; then systemctl list-units --full --no-legend box-task-* # just to show who was running systemctl kill --signal=SIGTERM box-task-* || true - systemctl reset-failed box-task-* || true + systemctl reset-failed box-task-* 2>/dev/null || true systemctl stop box-task-* || true # because of remain-after-exit in Ubuntu 16 we have to deactivate the service else readonly service_name="box-task-${task_id}" diff --git a/src/scripts/update.sh b/src/scripts/update.sh index 86de42b25..5befa3d32 100755 --- a/src/scripts/update.sh +++ b/src/scripts/update.sh @@ -25,10 +25,8 @@ echo "Updating Cloudron with ${source_dir}" readonly installer_path="${source_dir}/scripts/installer.sh" -echo "=> reset service ${UPDATER_SERVICE} status in case it failed" -if systemctl reset-failed "${UPDATER_SERVICE}"; then - echo "=> service has failed earlier" -fi +echo "=> reset service ${UPDATER_SERVICE} status (of previous update)" +systemctl reset-failed "${UPDATER_SERVICE}" 2>/dev/null || true # StandardError will follow StandardOutput in default inherit mode. https://www.freedesktop.org/software/systemd/man/systemd.exec.html echo "=> Run installer.sh as ${UPDATER_SERVICE}."