My upstart config looks something like this
start on filesystem
stop on runlevel S
respawn
exec /path/to/my/script
When this script dies and is respawned I would like to receive an email. Is this possible, or am I using the wrong tool for the job?
Thanks!