moved config steps into separate scripts
All checks were successful
All checks were successful
This commit is contained in:
11
rootfs/app/entrypoint.sh.d/10_user.sh
Executable file
11
rootfs/app/entrypoint.sh.d/10_user.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "# Creating user and group"
|
||||
|
||||
RANDOMPWD=$(tr -dc A-Za-z0-9 </dev/urandom | head -c 13)
|
||||
|
||||
addgroup -g "${PGID}" "${GROUPNAME}"
|
||||
addgroup nginx "${GROUPNAME}"
|
||||
adduser -DH -h "${PATH_WEBROOT}" -G "${GROUPNAME}" -u "${PUID}" "${USERNAME}"
|
||||
printf '%s\n%s' "${RANDOMPWD}" "${RANDOMPWD}" | passwd "${USERNAME}"
|
||||
echo "password for the user \"${USERNAME}\" is: ${RANDOMPWD}"
|
||||
Reference in New Issue
Block a user