This script send you e-mail notification about new updates:
1 2 3 4 5 6 7 8 9 10 |
# cat /root/check_update.sh #!/bin/bash email=soban@soban.pl hostnam=`hostname` apt-get update # sometimes change number of lines (for example proxmox 4.4 - 4; proxmox 5 - 5) if [ `apt-get --just-print upgrade | wc -l` != 5 ] then apt-get --just-print upgrade | mail -s "Update checker $hostnam" $email fi |
You can download the script from:
1 2 |
$ cd /root/ $ wget https://soban.pl/bash/check_update.sh |
You should set the correct e-mail address in the script, for now it is soban@soban.pl
Notification it’s looks something like that:
Should the script be executed:
1 |
# chmod +x /root/check_update.sh |
Also added to the crontab, every day to extend a new update:
1 |
00 06 * * * /root/check_update.sh > /dev/null 2>&1 |
Remember don’t to upgrade your system on Friday! Good luck!