comparison host/stop_nginx.sh @ 2141:c62dfd37545f nginx_decoupled

use regex trick to stop stop_nginx.sh from detecting itself
author Violet7
date Mon, 19 Jan 2026 20:56:48 -0800
parents bc999d5036fb
children 506cc134c0fe
comparison
equal deleted inserted replaced
2140:bc999d5036fb 2141:c62dfd37545f
1 #!/bin/bash 1 #!/bin/bash
2 2
3 set -e 3 set -e
4 # currently unused
5 . nginx_common.sh
6 4
7 PIDS=$( 5 PIDS=$(
8 ps -eo pid,comm,args | 6 ps -eo pid,args |
9 awk '/nginx: master process/ {print $1}' 7 awk '/[n]ginx: master process/ {print $1}'
10 ) 8 )
11 9
12 if [ -n "$PIDS" ]; then 10 if [ -n "$PIDS" ]; then
13 kill -QUIT $PIDS 11 kill -QUIT $PIDS
14 else 12 else