I think writing to the logs, which allows logwatch to cover it too, is probably enough.
]]>Logwatch is not a daemon, it is run by crond.
]]>mutt -F /path/to/muttrc -s "some title" -- e-mail_address@something < /path/to/log_file
]]>I did a little log check the other day and discovered that testnetconn has actually restored my network connection quite a few times since I started running it.
Now I think it would be nice to add an email notification when the script re-establishes the network.
Should I set this notification up directly in the script (adding variables for email address, subject, etc to the config file) or, seeing as cron runs the script anyway, recommend getting notifications from cron instead?
The first way seems more complete but the 2nd way seems much more holistic.
I should also mention that the script writes to the system logs as well, so I guess you could get notifications from a log watching tool too.
Opinions, ideas or suggestions most welcome.
]]>