Skip to content

Commit

Permalink
fix wait-ready script
Browse files Browse the repository at this point in the history
As noticed by @bflad, a successful last iteration would result in failure status.
Fixed now.
  • Loading branch information
odacremolbap committed Jan 10, 2016
1 parent e086851 commit c860f44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/default/systemd/docker-wait-ready.erb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
i=0
while [ $i -lt <%= @service_timeout * 2 %> ]; do
((i++))
<%= @docker_cmd %> ps | head -n 1 | grep ^CONTAINER > /dev/null 2>&1
[ $? -eq 0 ] && break
((i++))
sleep 0.5
done
[ $i -eq <%= @service_timeout * 2 %> ] && exit 1
Expand Down

0 comments on commit c860f44

Please sign in to comment.