You've already forked auto-update-ubuntu
cron job adjustments
This commit is contained in:
@@ -70,8 +70,14 @@ sed -i '/Unattended-Upgrade::Allowed-Origins/ s|//\s*"\${distro_id}:\${distro_co
|
||||
#
|
||||
# Create cron job running every Sunday at 04:00
|
||||
#
|
||||
cronfile="/etc/cron.d/updatesystem"
|
||||
cronjob='0 4 * * 0 root /usr/bin/apt update && /usr/bin/unattended-upgrade -v >/dev/null 2>&1'
|
||||
cronjob01='0 4 * * 0 root /usr/bin/apt update && /usr/bin/unattended-upgrade -v >/dev/null 2>&1'
|
||||
echo "$cronjob01" > /etc/cron.d/updatesystem
|
||||
|
||||
#
|
||||
# Ensure correct permissions for /etc/cron.d entries
|
||||
#
|
||||
chmod 644 /etc/cron.d/updatesystem
|
||||
chown root:root /etc/cron.d/updatesystem
|
||||
|
||||
#
|
||||
# Restart unattended upgrades and cron.
|
||||
|
||||
Reference in New Issue
Block a user