mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-06-17 17:56:27 +00:00
Small refactor of user/groups and add checks during startup. Only use -x in bash scripts when DEBUG=true set in env vars
This commit is contained in:
@ -12,6 +12,11 @@ export CYAN BLUE YELLOW RED RESET
|
||||
PUID=${PUID:-0}
|
||||
PGID=${PGID:-0}
|
||||
|
||||
NPMUSER=npm
|
||||
NPMGROUP=npm
|
||||
NPMHOME=/tmp/npmuserhome
|
||||
export NPMUSER NPMGROUP NPMHOME
|
||||
|
||||
if [[ "$PUID" -ne '0' ]] && [ "$PGID" = '0' ]; then
|
||||
# set group id to same as user id,
|
||||
# the user probably forgot to specify the group id and
|
||||
@ -40,3 +45,10 @@ log_fatal () {
|
||||
/run/s6/basedir/bin/halt
|
||||
exit 1
|
||||
}
|
||||
|
||||
# param $1: group_name
|
||||
get_group_id () {
|
||||
if [ "${1:-}" != '' ]; then
|
||||
getent group "$1" | cut -d: -f3
|
||||
fi
|
||||
}
|
||||
|
Reference in New Issue
Block a user