Calling /etc/init.d/consul restart sometimes ended up with a stopped consul process. The reason was that it would sometimes start consul before it was completely stopped. This can be easily reproduced runnning:  watch -n 0.5 -e '/etc/init.d/consul restart; sleep 0.1; /etc/init.d/consul status'
Calling /etc/init.d/consul restart sometimes ended up with a stopped consul process. The reason was that it would sometimes start consul before it was completely stopped. This can be easily reproduced runnning:
 watch -n 0.5 -e '/etc/init.d/consul restart; sleep 0.1; /etc/init.d/consul status'

Adding the --retry parameter lets start-stop-daemon wait until the consul process is actually stopped.

johnbellone/consul-cookbook,johnbellone/consul-cookbook,johnbellone/consul-cookbook