Mercurial Hosting > luan
annotate host/nginx_common.sh @ 2145:2b498e7f6d9e nginx_decoupled tip
test; ignore
| author | Violet7 |
|---|---|
| date | Mon, 19 Jan 2026 22:25:37 -0800 |
| parents | 5cf7c6b1dec9 |
| children |
| rev | line source |
|---|---|
|
2136
3ca8f933209d
Initial; use ~/.nginx-luan/ as nginx master conf dir instead of trying to detect the system default.
Violet7
parents:
diff
changeset
|
1 #!/bin/bash |
|
3ca8f933209d
Initial; use ~/.nginx-luan/ as nginx master conf dir instead of trying to detect the system default.
Violet7
parents:
diff
changeset
|
2 set -e |
|
3ca8f933209d
Initial; use ~/.nginx-luan/ as nginx master conf dir instead of trying to detect the system default.
Violet7
parents:
diff
changeset
|
3 |
|
3ca8f933209d
Initial; use ~/.nginx-luan/ as nginx master conf dir instead of trying to detect the system default.
Violet7
parents:
diff
changeset
|
4 export NGINX_ROOT_CONFIG_DIR="$HOME/.nginx-luan" |
|
3ca8f933209d
Initial; use ~/.nginx-luan/ as nginx master conf dir instead of trying to detect the system default.
Violet7
parents:
diff
changeset
|
5 export NGINX_ROOT_CONFIG_FILE="$NGINX_ROOT_CONFIG_DIR/nginx.conf" |
|
3ca8f933209d
Initial; use ~/.nginx-luan/ as nginx master conf dir instead of trying to detect the system default.
Violet7
parents:
diff
changeset
|
6 export NGINX_SITE_CONFIGS_DIR="$NGINX_ROOT_CONFIG_DIR/sites" |
|
3ca8f933209d
Initial; use ~/.nginx-luan/ as nginx master conf dir instead of trying to detect the system default.
Violet7
parents:
diff
changeset
|
7 export NGINX_LOG_DIR="$NGINX_ROOT_CONFIG_DIR/log" |
|
3ca8f933209d
Initial; use ~/.nginx-luan/ as nginx master conf dir instead of trying to detect the system default.
Violet7
parents:
diff
changeset
|
8 export NGINX_PID_DIR="$NGINX_ROOT_CONFIG_DIR" |
|
3ca8f933209d
Initial; use ~/.nginx-luan/ as nginx master conf dir instead of trying to detect the system default.
Violet7
parents:
diff
changeset
|
9 export NGINX_USER="$(whoami)" |
| 2138 | 10 export NGINX_GROUP="$(id -gn)" |
|
2136
3ca8f933209d
Initial; use ~/.nginx-luan/ as nginx master conf dir instead of trying to detect the system default.
Violet7
parents:
diff
changeset
|
11 |
|
3ca8f933209d
Initial; use ~/.nginx-luan/ as nginx master conf dir instead of trying to detect the system default.
Violet7
parents:
diff
changeset
|
12 # -p makes this succeed if the path exists on macos |
|
3ca8f933209d
Initial; use ~/.nginx-luan/ as nginx master conf dir instead of trying to detect the system default.
Violet7
parents:
diff
changeset
|
13 # on linux, mkdir always suceeds if path exists |
|
3ca8f933209d
Initial; use ~/.nginx-luan/ as nginx master conf dir instead of trying to detect the system default.
Violet7
parents:
diff
changeset
|
14 mkdir -p $NGINX_ROOT_CONFIG_DIR |
|
3ca8f933209d
Initial; use ~/.nginx-luan/ as nginx master conf dir instead of trying to detect the system default.
Violet7
parents:
diff
changeset
|
15 mkdir -p $NGINX_SITE_CONFIGS_DIR |
|
3ca8f933209d
Initial; use ~/.nginx-luan/ as nginx master conf dir instead of trying to detect the system default.
Violet7
parents:
diff
changeset
|
16 mkdir -p $NGINX_LOG_DIR |
|
3ca8f933209d
Initial; use ~/.nginx-luan/ as nginx master conf dir instead of trying to detect the system default.
Violet7
parents:
diff
changeset
|
17 mkdir -p $NGINX_PID_DIR |
