Hi,
I'm trying to set up incron to send me a notification when a log
changes. I wrote a script that takes the first line of a logfile, that
colorizes it with source-highlight and a syntax color file and sends it
to notify-send, so that I can read it with a nice pop up.
I formerly used inotify-wait and a "while true" loop to do that, but I
think using incron would be more elegant. However, I can't get this to work.
Attached is my script and my syntax file.
It works fine. To test it, install notify-send and source-highlight.
Save awesome.outlang in your home.
usage: sh popLog.sh /var/log/somelog
It should pop up a nice notification.
Now, I incrontab -e and I write
/var/log/kernel.log IN_CLOSE_WRITE sh ~/popLog.sh $@
And I trigger some event that puts something in the log file (turn off
and on the rfkill switch of my laptop). Nothing happens. Why?
This archive was generated by hypermail 2.2.0 : Tue Jun 05 2012 - 22:14:21 CEST