Mercurial Hosting > luan
annotate host/nginx_common.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 | |
| children | 67b504ba388c |
| 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)" |
|
3ca8f933209d
Initial; use ~/.nginx-luan/ as nginx master conf dir instead of trying to detect the system default.
Violet7
parents:
diff
changeset
|
10 |
|
3ca8f933209d
Initial; use ~/.nginx-luan/ as nginx master conf dir instead of trying to detect the system default.
Violet7
parents:
diff
changeset
|
11 # -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
|
12 # 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
|
13 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
|
14 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
|
15 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
|
16 mkdir -p $NGINX_PID_DIR |
