[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]
On Tue, 2009-04-28 at 11:53 +0100, Benjamin M. A'Lee wrote: > On Tue, Apr 28, 2009 at 09:47:09AM +0100, Richard Brown wrote: > > So can we respond to this please? Firstly is it possible to create a > > server that updates itself? > > Of course. I can’t imagine why anybody wouldn’t do this. At the very > least, a cron job should do it. On some ubuntu server boxes that I want to keep up to date but I'm not too paranoid about I have the following. It keeps them up to date daily and also reboots if required. I want them up to date more than I care about the very occasional few minutes of unexpected downtime. I bet there are many situations where people don't mind if the server disappears for a few minutes at some early hour of the morning once a month or so. /etc/cron.daily/autoupdate ---------------- #!/bin/sh apt-get -y update if [ -e /var/run/reboot-required ]; then rm /var/run/reboot-required fi apt-get -y dist-upgrade if [ -e /var/run/reboot-required ]; then rm -f /var/run/reboot-required shutdown -r 1 fi --------------- /usr/share/update-notifier/notify-reboot-required --------------- #!/bin/sh touch /var/run/reboot-required --------------- The second script has to be made executable. IIRC ubuntu-desktop has it's own notify-reboot-required script which is how the notify popup works after you've installed a new kernel. It's that which inspired the above. I'd be interested to hear of a better solution in anyone has one. Sophos Plc, The Pentagon, Abingdon Science Park, Abingdon, OX14 3YP, United Kingdom. Company Reg No 2096520. VAT Reg No GB 348 3873 20. -- The Mailing List for the Devon & Cornwall LUG http://mailman.dclug.org.uk/listinfo/list FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html