Include UnattendedUpgrades


I think it would be a good idea to include UnattendedUpgrades-package into DietPi with an option to configure it in “dietpi-config”. Any thoughts?

The reason we initially masked/disabled them is that those block APT access at random times. So when running install scripts you might run into cryptic APT errors (for end users) simply because some unattended update/upgrade is currently running. Also I find this implementation a bid in-transparent. Only a specific type of upgrades are applied, “security” updates, but not only those from the security repo. And there are other cases where of course newer APT packages include security relevant changes as well, but those are skipped then. So it was never 100% clear to me which upgrades are actually included and which not…

We though about implementing automated APT upgrades ourselves:
An DietPi update check is done daily. A dietpi.txt and dietpi-update UI setting could allow to run apt update and apt upgrade instead, if no DietPi update has been found.
This would be more lightweight and easier to control, since our update check is a cron job that is stopped on all other maintenance tasks/installs anyway.

But aside all of this, of course one can manually install the unattended-upgrades package and unmask the related services/timers:
for i in apt-daily{,-upgrade}.{service,timer}; do systemctl unmask $i; done
apt install unattended-upgrades

Hey MichaIng

Thanks for your extensive answer. I’d surely want apt-update && apt-upgrade integrated as an option for dietpi. Automation is king, right?

I do see the problem you’re describing. A couple of days I created my own cron job script which works wonders. Wish I could do it natively in dietpi-config though!