Upstart mail script
I'm trying to configure an Upstart script to send me an e-mail alert when a process is respawned.
I've tried post and pre-start, exec and post and pre-stop scripts. No one seems to be working.
Here's an example:
mail -s "ntpd Service Respawned" <email address hidden>
control + D
exec /etc/init.d/ntpd start
Once I kill the process (kill -9) the message.log will tell me it's being respawned but no clues about the script:
init: ntpd main process (12446) killed by KILL signal
init: ntpd main process ended, respawning
Any ideas or suggestions??