Skip to content

Commit

Permalink
Revert "Merge pull request sous-chefs#433 from zanox/master" (partially)
Browse files Browse the repository at this point in the history
This reverts commit a0595fb, reversing
changes made to b4c3c47.
  • Loading branch information
legal90 committed May 27, 2017
1 parent 95be769 commit 7310a26
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions templates/default/sysvinit.service.erb
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ _start() {
--pidfile $pidfile<% unless @pid_file_external %> --make-pidfile<% end %> \
--chuid $user --chdir "<%= @directory %>" \
--startas /bin/bash -- -c "exec $exec <%= @daemon_options %> >> $logfile 2>&1"

_wait_for_listening
}

_stop() {
Expand Down Expand Up @@ -109,25 +107,6 @@ _status_q() {
_status >/dev/null 2>&1
}

_wait_for_listening() {
echo -n "Waiting for consul daemon to be listening..."
for i in `seq 1 30`; do
sleep 1
# if ! start-stop-daemon --quiet --stop --test --pidfile $pidfile --user $user; then
if ! _status_q; then
echo " FAIL: consul process died"
return 2
fi
if "$exec" info >/dev/null; then
echo " OK"
return 0
fi
echo -n .
done
echo " FAIL: consul process is alive, but is not listening."
return 2
}

case "$1" in
start)
_status_q && exit 0
Expand Down

0 comments on commit 7310a26

Please sign in to comment.