Mercurial Hosting > luan
view host/nginx_common.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 | 5cf7c6b1dec9 |
line wrap: on
line source
#!/bin/bash set -e export NGINX_ROOT_CONFIG_DIR="$HOME/.nginx-luan" export NGINX_ROOT_CONFIG_FILE="$NGINX_ROOT_CONFIG_DIR/nginx.conf" export NGINX_SITE_CONFIGS_DIR="$NGINX_ROOT_CONFIG_DIR/sites" export NGINX_LOG_DIR="$NGINX_ROOT_CONFIG_DIR/log" export NGINX_PID_DIR="$NGINX_ROOT_CONFIG_DIR" export NGINX_USER="$(whoami)" export NGINX_GROUP"$(id -gn)" # -p makes this succeed if the path exists on macos # on linux, mkdir always suceeds if path exists mkdir -p $NGINX_ROOT_CONFIG_DIR mkdir -p $NGINX_SITE_CONFIGS_DIR mkdir -p $NGINX_LOG_DIR mkdir -p $NGINX_PID_DIR
