Upstart mail script
Asked by
Mariano González
Hi there.
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:
/etc/init/ntpd.conf
### ntpd
script
mail -s "ntpd Service Respawned" <email address hidden>
control + D
end script
respawn
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??
Thanks!!
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- upstart Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Mariano González
- Solved:
- Last query:
- Last reply:
To post a message you must log in.