Mercurial Hosting > luan
view host/gen_nginx.sh @ 2137:67b504ba388c nginx_decoupled
don't assume the user's primary group name is the same as their username
| author | Violet7 |
|---|---|
| date | Mon, 19 Jan 2026 20:20:03 -0800 |
| parents | 3ca8f933209d |
| children |
line wrap: on
line source
#!/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_GROUP >$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"
