Mercurial Hosting > luan
annotate host/stop_nginx.sh @ 2136:3ca8f933209d nginx_decoupled
Initial; use ~/.nginx-luan/ as nginx master conf dir instead of trying to detect the system default.
| author | Violet7 |
|---|---|
| date | Mon, 19 Jan 2026 19:47:11 -0800 |
| parents | 6a2383baecb6 |
| children | bc999d5036fb |
| 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 |
|
3ca8f933209d
Initial; use ~/.nginx-luan/ as nginx master conf dir instead of trying to detect the system default.
Violet7
parents:
2129
diff
changeset
|
4 . 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
|
5 |
|
3ca8f933209d
Initial; use ~/.nginx-luan/ as nginx master conf dir instead of trying to detect the system default.
Violet7
parents:
2129
diff
changeset
|
6 NGINX_PID_FILE="$NGINX_PID_DIR/nginx.pid" |
|
3ca8f933209d
Initial; use ~/.nginx-luan/ as nginx master conf dir instead of trying to detect the system default.
Violet7
parents:
2129
diff
changeset
|
7 |
|
3ca8f933209d
Initial; use ~/.nginx-luan/ as nginx master conf dir instead of trying to detect the system default.
Violet7
parents:
2129
diff
changeset
|
8 # if file exists and is non empty |
|
3ca8f933209d
Initial; use ~/.nginx-luan/ as nginx master conf dir instead of trying to detect the system default.
Violet7
parents:
2129
diff
changeset
|
9 if [ -s "$NGINX_PID_FILE" ]; then |
|
3ca8f933209d
Initial; use ~/.nginx-luan/ as nginx master conf dir instead of trying to detect the system default.
Violet7
parents:
2129
diff
changeset
|
10 sudo nginx -c $NGINX_ROOT_CONFIG_FILE -s stop |
|
3ca8f933209d
Initial; use ~/.nginx-luan/ as nginx master conf dir instead of trying to detect the system default.
Violet7
parents:
2129
diff
changeset
|
11 else |
|
3ca8f933209d
Initial; use ~/.nginx-luan/ as nginx master conf dir instead of trying to detect the system default.
Violet7
parents:
2129
diff
changeset
|
12 echo "PID file empty or non existent, doing nothing." |
|
3ca8f933209d
Initial; use ~/.nginx-luan/ as nginx master conf dir instead of trying to detect the system default.
Violet7
parents:
2129
diff
changeset
|
13 fi |
