Automatic security updates
Installs Debian security updates automatically every day (without a reboot)
Add to a guest
In the guest as root – container and VM alike:
update --add-modules unattended-upgradesRuns a normal update and installs the module on the way.
From the Proxmox node, without logging in:
pct exec <ID> -- update --add-modules unattended-upgrades # container
ssh root@<IP> update --add-modules unattended-upgradesChoose when creating a guest
Without a dialog, on the Proxmox node:
IAC_NONINTERACTIVE=1 var_modules=auto-update,unattended-upgrades \
bash -c "$(curl -fsSL https://haypack.dev/<app>/ct.sh)"var_modules replaces the app's preselection – keep auto-update in the list if you want it. Interactive: choose “advanced” in the dialog, or tick the module in the generator on the app page.
Remove
update --remove-modules unattended-upgradesRemoves the module's packages, services, firewall rules and configuration again. Data stays.
Details
Installs Debian’s security updates every day with unattended-upgrades, without a reboot.
Services of the updated packages are restarted by the packages themselves, as with a manual
apt upgrade. Other updates, the app, the modules and iac itself still need the full update –
by hand or with the module auto-update.
unattended-upgrade --dry-run --debug # what it would install now
less /var/log/unattended-upgrades/unattended-upgrades.log
systemctl list-timers apt-daily-upgrade.timer # next run
What gets installed is Debian’s default in /etc/apt/apt.conf.d/50unattended-upgrades. Own
settings go into /etc/apt/apt.conf.d/52unattended-upgrades-local – e.g. a mail after every run
with the module mail-relay:
Unattended-Upgrade::Mail "root";
When the module is removed, the package and its daily run go again.
Installiert Debians Sicherheitsupdates jeden Tag mit unattended-upgrades, ohne Neustart.
Dienste der aktualisierten Pakete starten die Pakete selbst neu, wie bei einem apt upgrade von
Hand. Andere Updates, die App, die Module und iac selbst brauchen weiterhin das vollständige
update – von Hand oder mit dem Modul auto-update.
unattended-upgrade --dry-run --debug # was es jetzt installieren würde
less /var/log/unattended-upgrades/unattended-upgrades.log
systemctl list-timers apt-daily-upgrade.timer # nächster Lauf
Was installiert wird, ist Debians Vorgabe in /etc/apt/apt.conf.d/50unattended-upgrades. Eigene
Einstellungen gehören in /etc/apt/apt.conf.d/52unattended-upgrades-local – etwa eine Mail nach
jedem Lauf mit dem Modul mail-relay:
Unattended-Upgrade::Mail "root";
Wird das Modul entfernt, verschwinden das Paket und sein täglicher Lauf wieder.