Enabling unattended-upgrades from a shell script

Posted by Grant Watson on Ask Ubuntu See other posts from Ask Ubuntu or by Grant Watson
Published on 2012-10-20T04:24:36Z Indexed on 2012/10/20 5:21 UTC
Read the original article Hit count: 355

Filed under:
|
|
|

I have a shell script to automatically configure new Ubuntu virtual machines for my purposes. I would like this script to install and enable unattended-upgrades, but I cannot figure out how to do so without user interaction.

The usual way to enable upgrades is dpkg-reconfigure unattended-upgrades, but of course that is interactive. The noninteractive front end avoids asking any questions at all, and the text front end seems bound and determined to do its I/O with the tty and not with stdin/stdout.

© Ask Ubuntu or respective owner

Related posts about server

Related posts about upgrade