Mercurial Hosting > luan
comparison host/gen_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 | |
| children | 67b504ba388c |
comparison
equal
deleted
inserted
replaced
| 2135:e94d10d071e4 | 2136:3ca8f933209d |
|---|---|
| 1 #!/bin/bash | |
| 2 set -e | |
| 3 . nginx_common.sh | |
| 4 | |
| 5 # Function to print the line and the command that failed | |
| 6 error_trap() { | |
| 7 local exit_code=$? | |
| 8 echo "Error: Command failed at line $BASH_LINENO with exit code $exit_code" | |
| 9 exit $exit_code | |
| 10 } | |
| 11 | |
| 12 trap error_trap ERR | |
| 13 | |
| 14 LUANHOST_DIR="$(pwd)" | |
| 15 | |
| 16 cp startup/nginx/mime.types $NGINX_ROOT_CONFIG_DIR | |
| 17 luan startup/nginx/nginx_master.conf.luan $NGINX_ROOT_CONFIG_DIR $NGINX_SITE_CONFIGS_DIR $NGINX_LOG_DIR $NGINX_PID_DIR $NGINX_USER >$NGINX_ROOT_CONFIG_FILE | |
| 18 luan startup/nginx/nginx.conf.luan $LUANHOST_DIR >"$NGINX_SITE_CONFIGS_DIR/luanhost.conf" | |
| 19 | |
| 20 # DON'T put this in the auto-loaded configs dir (NGINX_SITE_CONFIGS_DIR), | |
| 21 # it is not meant to be loaded on its own. | |
| 22 luan startup/nginx/nginx.default.conf.luan $LUANHOST_DIR >"$LUANHOST_DIR/local/luanhost.default.conf" |
