Mercurial Hosting > luan
annotate host/stop_nginx.sh @ 2140:bc999d5036fb nginx_decoupled
more robust stop_nginx.sh
| author | Violet7 |
|---|---|
| date | Mon, 19 Jan 2026 20:37:47 -0800 |
| parents | 3ca8f933209d |
| children | c62dfd37545f |
| rev | line source |
|---|---|
| 1637 | 1 #!/bin/bash |
| 2 | |
|
2136
3ca8f933209d
Initial; use ~/.nginx-luan/ as nginx master conf dir instead of trying to detect the system default.
Violet7
parents:
2129
diff
changeset
|
3 set -e |
| 2140 | 4 # currently unused |
|
2136
3ca8f933209d
Initial; use ~/.nginx-luan/ as nginx master conf dir instead of trying to detect the system default.
Violet7
parents:
2129
diff
changeset
|
5 . nginx_common.sh |
|
3ca8f933209d
Initial; use ~/.nginx-luan/ as nginx master conf dir instead of trying to detect the system default.
Violet7
parents:
2129
diff
changeset
|
6 |
| 2140 | 7 PIDS=$( |
| 8 ps -eo pid,comm,args | | |
| 9 awk '/nginx: master process/ {print $1}' | |
| 10 ) | |
|
2136
3ca8f933209d
Initial; use ~/.nginx-luan/ as nginx master conf dir instead of trying to detect the system default.
Violet7
parents:
2129
diff
changeset
|
11 |
| 2140 | 12 if [ -n "$PIDS" ]; then |
| 13 kill -QUIT $PIDS | |
|
2136
3ca8f933209d
Initial; use ~/.nginx-luan/ as nginx master conf dir instead of trying to detect the system default.
Violet7
parents:
2129
diff
changeset
|
14 else |
| 2140 | 15 echo "No nginx master process found, not attempting to stop." |
|
2136
3ca8f933209d
Initial; use ~/.nginx-luan/ as nginx master conf dir instead of trying to detect the system default.
Violet7
parents:
2129
diff
changeset
|
16 fi |
