How to setup automatic updates for Ubuntu running Discourse?

DigitalOcean VM - In Ubuntu (16.04.2) I used the “dpkg-reconfigure -plow unattended-upgrades” command, but I get this return “update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults”

1- How do I fix this issue so updates install automatically?
2- How do I install updates manually for Ubuntu manually when automatic updates aren’t working or just to make sure everything is up to date?

1 Like

That warning does not mean that automatic updates are not working.

@pfaffman I know this isn’t a Linux forum, but do you know to check automatic updates are happening and how to check manually?

Hey, @mhwebee, since you asked me specifically, I’ll answer, but I, using a tablet and not a real computer…

The simple, it’s not a Linux forum, way is to wait a few days and log in again. In a while you should get a message saying that there are x updates and zero of them are security updates. Just look again in a week or two. Maybe reboot first. I, not entirely clear what needs to get restarted to reread those settings.

Sorry that’s not very satisfying, but it’s usually what I do.

When I want to check what the way to see the way to see what upgrades are available, I have to read the man page or google.

The “message of the day” (“motd”), which is what indicates whether there are packages that need updating, or the system needs to be rebooted, or whatever, is dynamically generated on Ubuntu systems at login, via the update-motd(5) system, which is in turn invoked by pam_motd.so during login (unless otherwise modified by the system admin). The specific program which detects if updates are required and writes the appropriate verbiage is /usr/lib/update-notifier/update-motd-updates-available, which is a vaguely readable shell script that, once you chew through the boilerplate, calls /usr/lib/update-notifier/apt-check --human-readable, which you yourself can call at any time (even as a non-root user) to tell you what’s what. The information may be a little out of date, because the apt package lists only get refreshed once a day (via /etc/cron.daily/update-notifier-common, which calls /usr/lib/update-notifier/package-data-downloader), but within 24 hours of a security update becoming available you should see it reported in that apt-check call (you can also run sudo apt-get update yourself, which will update the package lists immediately).

And yes, this isn’t a Linux forum. :grinning:

6 Likes

Check this way to do for all repos. https://github.com/abhigenie92/unattended_upgrades_repos

Alternately, don’t use a huge number of third-party repos on your production servers… software packages are not pokemon, there is no need to catch them all.

5 Likes

The script is intended for PCs mostly. Thanks :slight_smile:

This is a topic about running Discourse on a server.