You've already forked unattended-updates
logic changes and cron changes
This commit is contained in:
@@ -57,7 +57,7 @@ sed -i '/${distro_id}:${distro_codename}-updates/ s/^\/\///' /etc/apt/apt.conf.d
|
||||
# ||
|
||||
# Optional: Uncomment the next 2 lines for removal of unused packages this equals apt autoremove
|
||||
|
||||
# Optionnal: Comment out line 1 and 2 for reboot if needed and line 3 to rebbot with user logged in with a #.
|
||||
# Optionnal: Comment out line 1 and 2 for reboot if needed and line 3 to rebbot with user logged in.
|
||||
# ||
|
||||
# \/
|
||||
sed -i '\/\/Unattended-Upgrade::Automatic-Reboot "false"/ s/^\/\///' /etc/apt/apt.conf.d/50unattended-upgrades
|
||||
@@ -69,7 +69,7 @@ sed -i '\/\/Unattended-Upgrade::Automatic-Reboot-WithUsers/ s/^\/\///' /etc/apt/
|
||||
#
|
||||
# Create cronjob running every sunday at 04:00
|
||||
#
|
||||
cronjob01="0 4 * * 7 root /usr/bin/apt update && /usr/bin/unattended-upgrade -v >/dev/null 2>&1"
|
||||
cronjob01="0 4 * * 6 root /usr/bin/apt update && /usr/bin/unattended-upgrade -v >/dev/null 2>&1"
|
||||
echo "$cronjob01" > /etc/cron.d/updatesystem
|
||||
#
|
||||
# Restart unatended upgrades and cron.
|
||||
|
Reference in New Issue
Block a user