Skip to content

Commit

Permalink
Unattended upgrades: Use hypervisor detection for adjusting reboot time
Browse files Browse the repository at this point in the history
The policy is to reboot Hypervisor machines one hour before the guest
machines.
  • Loading branch information
amotl committed Mar 30, 2022
1 parent 3775112 commit 1cb4dad
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion debian-enable-unattended-upgrades.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
# # Enable automatic reboots. Default is `false`.
# export UNATTENDED_REBOOT_ENABLE=true
#
# # Configure reboot time. Default is `04:00`.
# # Configure reboot time.
# # Default is `03:00` for hypervisor machines and `04:00` for guest machines.
# export UNATTENDED_REBOOT_TIME=22:00
#
# # Configure email notifications. Default is `no emails`.
Expand Down Expand Up @@ -53,7 +54,11 @@ COMMUNITY_REPOSITORIES_DISABLED="packages.grafana.com repo.mosquitto.org repos.i
# Set default values for optional configuration settings outlined above.
UNATTENDED_PACKAGE_TIME=${UNATTENDED_PACKAGE_TIME:-7,16:00}
UNATTENDED_REBOOT_ENABLE=${UNATTENDED_REBOOT_ENABLE:-false}
if is_hypervisor; then
UNATTENDED_REBOOT_TIME=${UNATTENDED_REBOOT_TIME:-03:00}
else
UNATTENDED_REBOOT_TIME=${UNATTENDED_REBOOT_TIME:-04:00}
fi


# ---------------
Expand Down

0 comments on commit 1cb4dad

Please sign in to comment.