File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,14 @@ if [ "$1" = "unitd" ] || [ "$1" = "unitd-debug" ]; then
29
29
echo " $0 : /docker-entrypoint.d/ is not empty, launching Unit daemon to perform initial configuration..."
30
30
/usr/sbin/$1 --control unix:/var/run/control.unit.sock
31
31
32
- while [ ! -S /var/run/control.unit.sock ]; do echo " $0 : Waiting for control socket to be created..." ; /bin/sleep 0.1; done
32
+ for i in $( /usr/bin/seq $WAITLOOPS ) ; do
33
+ if [ ! -S /var/run/control.unit.sock ]; then
34
+ echo " $0 : Waiting for control socket to be created..."
35
+ /bin/sleep $SLEEPSEC
36
+ else
37
+ break
38
+ fi
39
+ done
33
40
# even when the control socket exists, it does not mean unit has finished initialisation
34
41
# this curl call will get a reply once unit is fully launched
35
42
/usr/bin/curl -s -X GET --unix-socket /var/run/control.unit.sock http://localhost/
@@ -62,7 +69,7 @@ if [ "$1" = "unitd" ] || [ "$1" = "unitd-debug" ]; then
62
69
63
70
for i in $( /usr/bin/seq $WAITLOOPS ) ; do
64
71
if [ -S /var/run/control.unit.sock ]; then
65
- echo " $0 Waiting for control socket to be removed..."
72
+ echo " $0 : Waiting for control socket to be removed..."
66
73
/bin/sleep $SLEEPSEC
67
74
else
68
75
break
You can’t perform that action at this time.
0 commit comments