diff --git a/cluster/apt.apply.update.sh b/cluster/apt.apply.update.sh index 7b1e4c9..1c0d927 100755 --- a/cluster/apt.apply.update.sh +++ b/cluster/apt.apply.update.sh @@ -126,6 +126,30 @@ No Maco upgrade require." return "${return_maco_upgrade_present}" +} +# }}} +is_maco_upgrade_absent() { # {{{ + + return_maco_upgrade_absent="0" + + ## Check if temp Maco upgrade file is present + if [ -f "${MACO_TMP_FILE}" ]; then + return_maco_upgrade_absent="1" + debug_message "is_maco_upgrade_absent − \ +Maco upgrade seems available." + + ## Check if temp Maco urgent upgrade file is present + elif [ -f "${MACO_TMP_URGENT_FILE}" ]; then + return_maco_upgrade_absent="1" + debug_message "is_maco_upgrade_absent − \ +Maco urgent upgrade seems available." + else + debug_message "is_maco_upgrade_absent − \ +No Maco upgrade require." + fi + + return "${return_maco_upgrade_absent}" + } # }}} is_queue_enable() { # {{{ @@ -277,6 +301,11 @@ main() { # {{{ is_maco_upgrade_present \ && exit 0 + ## If Maco upgrade is absent + ### Reboot the system + is_maco_upgrade_absent \ + && systemctl reboot + } # }}}