Skip to content
This repository has been archived by the owner on Aug 25, 2021. It is now read-only.

Commit

Permalink
Give consul time to install its HUP signal handler to avoid immediate…
Browse files Browse the repository at this point in the history
… shutdown when invoked via knife ssh, fixed sous-chefs#125
  • Loading branch information
martj686 committed Feb 9, 2015
1 parent 61855cd commit 7f9e56d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions templates/default/consul-init.erb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ case "$1" in
echo "Starting $NAME"
$CMD >> "$LOGFILE" &
echo $! > "$PIDFILE"

# Sleep gives consul time to install its HUP signal handler
sleep 3
if ! is_running; then
echo "Unable to start $NAME, see $LOGFILE"
exit 1
Expand Down

0 comments on commit 7f9e56d

Please sign in to comment.