From e2e1845ce9b994a7afb535e6bd725ccb648b41c4 Mon Sep 17 00:00:00 2001 From: m8in Date: Wed, 22 Apr 2026 21:21:39 +0200 Subject: [PATCH] fixed check unattended upgrades disabled --- ...system_unattended_upgrades_are_disabled.check.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/script/check/host/all/system_unattended_upgrades_are_disabled.check.sh b/script/check/host/all/system_unattended_upgrades_are_disabled.check.sh index e05d3c2..6613d2d 100755 --- a/script/check/host/all/system_unattended_upgrades_are_disabled.check.sh +++ b/script/check/host/all/system_unattended_upgrades_are_disabled.check.sh @@ -1,5 +1,14 @@ #!/bin/bash - -! systemctl is-enabled unattended-upgrades.service > /dev/null 2>&1 \ +# +# There are three components working together: +# - systemctl status unattended-upgrades.service (One-Shot-Service, loaded means system knows the service, it DOES NOT run in background) +# - systemctl status apt-daily.timer (apt update) +# - systemctl status apt-daily-upgrade.timer (apt upgrade) +# +# So disable/enaable the Upgrade with: +# - systemctl disable --now apt-daily-upgrade.timer (--now means disable and stop) +# - systemctl enable --now apt-daily-upgrade.timer (--now means enable and start) +# +! systemctl is-enabled apt-daily-upgrade.timer > /dev/null 2>&1 \ && exit 0 exit 1