obs wrote:
Some email clients support RSS as well, Thunderbird does they just appear like mini web pages and you get unread notifications when new items appear.
There's also various services out there that can email you when feeds are updated (have a google).
Or you can have a quick and dirty bash script, something like this
Code:
curl -s https://www.linode.com/kernels/rss.xml | grep "Latest.*$(uname -r)" > /dev/null
if [ $? -eq 1 ]
then touch /var/run/reboot-required
fi
That checks if your kernel is the latest and creates /var/run/reboot-required which on ubuntu will trigger a reboot required warning when you log in, you could make it a cron job if you like.
I thought about doing something like that obs thanks. My understanding with Google dropping support for RSS is that it will be going away so I imagine at some point this will start failing.
I suppose the same approach would work with the api.kernels call too though.
edit:
I changed your curl line to use my key (not abc123) and verified that echo $? does indeed get set correctly.
Code:
curl -s "https://api.linode.com/?api_key=abc123&api_action=avail.kernels&isXen=1" | grep "Latest.*$(uname -r)"
I added an email notification line after your line to set the reboot stated (cool idea I wasn't aware how that happened).
Code:
mail -s "New Linode Kernel is available - Reboot Required" me@mydomain.foo
So the script for anyone who wants to use obs' script with the API instead of the RSS feed URL:
Code:
#!/bin/bash
curl -s "https://api.linode.com/?api_key=abc123&api_action=avail.kernels&isXen=1" | grep "Latest.*$(uname -r)" > /dev/null
if [ $? -eq 1 ]; then
#echo "test"
touch /var/run/reboot-required
mail -s "New Linode Kernel is available - Reboot Required" me@mydomain.foo
fi
Thanks obs Happy New Year
