Hi,
I have an HTTP server daemon process that I start using upstart. When I
start it I'd like it to wait for at most 60 seconds for an HTTP check to
return 200. If it doesn't return within 60 I'd like to fail "start myapp",
otherwise I'd like to return "start myapp" as soon as I get a correct HTTP
response.
I've been trying to use
post-start script
/bin/my-healthcheck --max-wait 60
if [ $? -ne 0 ]; then
stop
exit 1
fi
end script
But "stop; exit 1" doesn't seem to stop my service.
Can this be done using upstart? Or will I need to `exec myservice_safe`
that initiates a check and my main script? Or use events?
Thanks,
Jens
PS. I've cross posted my question here:
https://serverfault.com/questions/583426/why-is-this-upstart-script-not-stopping-my-process
--
upstart-devel mailing list
[email protected]
Modify settings or unsubscribe at:
https://lists.ubuntu.com/mailman/listinfo/upstart-devel