Mercurial Hosting > luan
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/host/gen_nginx.sh Mon Jan 19 19:47:11 2026 -0800 @@ -0,0 +1,22 @@ +#!/bin/bash +set -e +. nginx_common.sh + +# Function to print the line and the command that failed +error_trap() { + local exit_code=$? + echo "Error: Command failed at line $BASH_LINENO with exit code $exit_code" + exit $exit_code +} + +trap error_trap ERR + +LUANHOST_DIR="$(pwd)" + +cp startup/nginx/mime.types $NGINX_ROOT_CONFIG_DIR +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 +luan startup/nginx/nginx.conf.luan $LUANHOST_DIR >"$NGINX_SITE_CONFIGS_DIR/luanhost.conf" + +# DON'T put this in the auto-loaded configs dir (NGINX_SITE_CONFIGS_DIR), +# it is not meant to be loaded on its own. +luan startup/nginx/nginx.default.conf.luan $LUANHOST_DIR >"$LUANHOST_DIR/local/luanhost.default.conf"
