Skip to content

Commit 240cf41

Browse files
authored
Add check for nginx pid file in test docker images (#1166)
* add check for nginx pid file * add alpine default path /var/run/nginx/nginx.pid
1 parent e56562d commit 240cf41

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/docker/entrypoint.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ echo "starting nginx ..."
3333
nginx_pid=$!
3434

3535
SECONDS=0
36-
37-
while ! ps -ef | grep "nginx: master process" | grep -v grep; do
36+
while [[ ! -f /var/run/nginx.pid ]] && [[ ! -f /var/run/nginx/nginx.pid ]]; do
3837
if (( SECONDS > 30 )); then
3938
echo "couldn't find nginx master process"
4039
exit 1
4140
fi
41+
sleep 1
4242
done
4343

4444
cat /etc/nginx-agent/nginx-agent.conf;

0 commit comments

Comments
 (0)