Skip to content

Commit 6f6cfcc

Browse files
committed
add quit
1 parent 19a4360 commit 6f6cfcc

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

test/docker/nginxless-entrypoint.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,15 @@ handle_term()
1010
wait -n ${agent_pid}
1111
}
1212

13-
trap 'handle_term' TERM
13+
handle_quit() {
14+
echo "received QUIT signal"
15+
echo "stopping nginx-agent ..."
16+
kill -QUIT "${agent_pid}" 2>/dev/null
17+
wait -n ${agent_pid}
18+
}
19+
20+
trap 'handle_term' TERM
21+
trap 'handle_quit' QUIT
1422

1523
cat /etc/nginx-agent/nginx-agent.conf;
1624

0 commit comments

Comments
 (0)