nginx-proxy-manager-zh/docker/rootfs/etc/s6-overlay/s6-rc.d/nginx/run
Jamie Curnow 56a92e5c0e
Run as root by default
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
2023-03-30 09:04:37 +10:00

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