By dordar
Im working on setting up a lot of droplets, on Ubuntu 16.04, However it is very time consuming to go into each of the droplets and run sudo apt-get update and sudo apt-get dist-upgrade.
So what I have done is I have added following into my root crontab: sudo crontab -u root -e
0 3 * * * root /usr/bin/apt-get update && /usr/bin/apt-get dist-upgrade -q -y >> /var/log/apt/myupdates.log
However it is not working, and I was wondering if there is other things I need to think about?
PS: I have followed DO tutorials on how to disable root, so I dont have a root user, is this a problem?
Thanks
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
Your idea is good, and removing root would fix it, but I suggest looking into this as it provides more options and integrates better: https://help.ubuntu.com/16.04/serverguide/automatic-updates.html
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.