#!/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
