sstarcher / docker-sensu

Dockerized Sensu - Client, Server, Api
MIT License
103 stars 72 forks source link

Calling the sensu process with exec #26

Closed lucasvasconcelos closed 8 years ago

lucasvasconcelos commented 8 years ago

Since the sensu process was started directly from the script as a new process, sensu was not able to receive the SIGTERM from the docker stop. Making it exits unexpectedly.

Starting it with the bash builtin exec command (http://wiki.bash-hackers.org/commands/builtin/exec) the bash script is replaced by the sensu process, and it can receive the signals from docker correctly and shutdown gracefully.

I've already tested this solution on my containers e updated my local registry images. Hope this change makes sense for you.

sstarcher commented 8 years ago

@lucasvasconcelos yep makes sense. I really should update this to support - https://github.com/Yelp/dumb-init