
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
14 lines
241 B
Text
Executable file
14 lines
241 B
Text
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
|