From 1595b625cdc620eebab71d28f0843097916a5e9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gardais=20J=C3=A9r=C3=A9my?= Date: Tue, 22 Dec 2020 15:42:16 +0100 Subject: [PATCH] Let Maco reboot the host with atd --- cluster/maco.apply.update.sh | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/cluster/maco.apply.update.sh b/cluster/maco.apply.update.sh index 3e45cd4..ed0491a 100755 --- a/cluster/maco.apply.update.sh +++ b/cluster/maco.apply.update.sh @@ -10,7 +10,6 @@ # Vars {{{ readonly PROGNAME=$(basename "${0}") -readonly PROGDIR=$(readlink -m $(dirname "${0}")) readonly ARGS="${*}" readonly NBARGS="${#}" [ -z "${DEBUG}" ] && readonly DEBUG=1 @@ -230,15 +229,6 @@ Try to apply Maco upgrade". /opt/maco/bin/maco.autoupdate.sh -} -# }}} -clean_host() { # {{{ - - debug_message "clean_host − \ -Try to clean temp files,…". - - rm -f -- "${MACO_TMP_FILE}" "${MACO_TMP_URGENT_FILE}" - } # }}} main() { # {{{ @@ -288,13 +278,10 @@ main() { # {{{ systemctl --quiet enable maco.service > /dev/null 2>&1 ## Then try to upgrade Maco - ### If error: Exit 50 - ### If success: Clean host (temp files,…) - ### then reboot the system + ### If success: exit 0 (leave reboot to maco/atd) + ### Temp files will be automatically cleaned at next startup upgrade_maco \ - || exit 50 \ - && clean_host \ - && systemctl reboot + && exit 0 } # }}}