mirror of
https://github.com/xiaoxinpro/nginx-proxy-manager-zh.git
synced 2025-02-02 17:58:13 -05:00
56a92e5c0e
Optionally run as another user/group only if the env vars are specified. Should give flexibility to those who need to run processes as root and open ports without having to request additional priveleges
15 lines
241 B
Plaintext
Executable File
15 lines
241 B
Plaintext
Executable File
#!/command/with-contenv bash
|
|
# shellcheck shell=bash
|
|
|
|
set -e
|
|
|
|
. /bin/common.sh
|
|
|
|
if [ "$PUID" = '0' ]; then
|
|
log_info 'Starting nginx ...'
|
|
exec nginx
|
|
else
|
|
log_info "Starting nginx as npmuser ($PUID) ..."
|
|
exec s6-setuidgid npmuser nginx
|
|
fi
|