annotate host/stop_nginx.sh @ 2138:5cf7c6b1dec9 nginx_decoupled

minor fix
author Violet7
date Mon, 19 Jan 2026 20:27:02 -0800
parents 3ca8f933209d
children bc999d5036fb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1637
a65802b06b01 add nginx scripts
fffilimonov
parents:
diff changeset
1 #!/bin/bash
a65802b06b01 add nginx scripts
fffilimonov
parents:
diff changeset
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