suppress reset-failed warning message

(cherry picked from commit f9f44b18ad)
This commit is contained in:
Girish Ramakrishnan
2020-10-12 10:08:07 -07:00
parent cdae1f0d06
commit 837ce0a879
2 changed files with 3 additions and 5 deletions
+1 -1
View File
@@ -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}"
+2 -4
View File
@@ -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}."