You can add a start script message that will send an email if the service is updated -
post-start script
echo "my-foo service started at `date +"%F %T.%N"`" | mail -s "My-foo Service Started" you@example.com
end script
Similarly, you can use post-stop:
post-stop script
echo "my-foo service stopped at `date +"%F %T.%N"`" | mail -s "My-foo Service Stopped" you@example.com
end script
source
share