cron job question (for checking kernel updates)

poma pomidorabelisima at gmail.com
Thu Oct 3 06:24:23 UTC 2013


On 03.10.2013 02:55, Ranjan Maitra wrote:

> 
> Thanks! But this does not "work" either. Here is what I tried in my
> crontab -e:
> 
> 0 * * * * maitra DISPLAY=:0.0 $HOME/scripts/yum/check-kernel.sh
> 
> (maitra is my username).
> 
> Here is how I changed my check-kernel.sh, though I am not sure if there
> was a problem with the earlier one....
> 
> $more check-kernel.sh 
> 
> #!/bin/bash
> # from http://goo.gl/Mqq6UP
> 
> latestkernel=$(rpm -q kernel |tail -n1|sed -e 's/kernel-//')
> 
> #echo "$latestkernel"
> 
> if uname -a | grep -qv "$latestkernel"; then
> notify-send "Kernel UPDATE on ${HOSTNAME}: " \
> "<b><i>Running</i></b> kernel is 
> <b><i>$(uname -r | awk '{gsub(/*PAE/,""); print}')</i></b>
> but <b>latest</b> <b><u>installed</u></b> is
> <b><u>${latestkernel}</u></b>
> required
> <b><u>REBOOT</u></b>"
> fi;
> 
> How do you get yours to work?
> 
> (Works fine from the commandline, of course.) Btw, FWIW, I am using
> dunst.


http://goo.gl/Mqq6UP
Cronie-notify-send-Dunst-Openbox.webm


poma




More information about the users mailing list