Skip to content

Commit a3d037c

Browse files
committed
add check for nginx pid file
1 parent a4918b3 commit a3d037c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/docker/entrypoint.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,14 @@ 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 ]]; do
3837
if (( SECONDS > 30 )); then
3938
echo "couldn't find nginx master process"
4039
exit 1
40+
sleep 1
4141
fi
4242
done
43+
nginx_pid=$(cat /var/run/nginx.pid)
4344

4445
cat /etc/nginx-agent/nginx-agent.conf;
4546

0 commit comments

Comments
 (0)