I've created a very basic script to run apt-get update and apt-get dist-upgrade unattended (run with cron) and save the logs. Though, it's not really a script, just a file containing the commands to run in order: pasteit .com/18601
I'm currently testing this and ran into some unexpected behavior during the recent Kernel upgrade: pasteit .com/18602
It appears the grep for the Kernel name kicked in and restarted the server before the upgrade even started. Does apt-get dist-upgrade run in the background or should the script wait for the process to finish before proceeding to the next step?
The following day it then did it correctly but in a non-test scenario it wouldn't run for another month pasteit .com/18603
I'm basically trying to find out if this is a script error. Someone else mentioned that they checked the server the day it failed to update and apt-get dist-upgrade said there were no outstanding patches but I can't confirm this.
Any help would be appreciated!
Raxje
P.S. I realize that the -q is not required, will remove that!