We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 868816e commit 7c730e9Copy full SHA for 7c730e9
bin/test
@@ -4,6 +4,9 @@
4
# $1 host
5
# $2 port
6
# $3 attempts
7
+
8
+FORCE_EXIT=false
9
10
function waitForService()
11
{
12
ATTEMPTS=0
@@ -14,13 +17,20 @@ function waitForService()
14
17
printf "service is not running %s:%s\n" $1 $2
15
18
exit 1
16
19
fi
20
+ if [ "$FORCE_EXIT" = true ]; then
21
+ exit;
22
+ fi
23
24
sleep 1
25
done
26
27
printf "service is online %s:%s\n" $1 $2
28
}
29
30
+trap "FORCE_EXIT=true" SIGTERM SIGINT
31
32
waitForService rabbitmq 5672 50
33
+waitForService rabbitmq_ssl 5671 50
34
waitForService mysql 3306 50
35
waitForService redis 6379 50
36
waitForService beanstalkd 11300 50
0 commit comments