🗃️ Committing everything that changed 🗃️

rootfs/usr/local/etc/docker/functions/entrypoint.sh
This commit is contained in:
casjay 2024-08-01 14:50:02 -04:00
parent f7dbc8c12e
commit b3a7c969c6
Signed by untrusted user who does not match committer: jason
GPG Key ID: 1AB309F42A764145

View File

@ -505,7 +505,7 @@ __create_service_user() {
grep -sq "^$create_user:" "/etc/passwd" && grep -sq "^$create_group:" "/etc/group" && return grep -sq "^$create_user:" "/etc/passwd" && grep -sq "^$create_group:" "/etc/group" && return
[ "$create_user" = "root" ] && [ "$create_group" = "root" ] && return 0 [ "$create_user" = "root" ] && [ "$create_group" = "root" ] && return 0
if [ "$RUNAS_USER" != "root" ] && [ "$RUNAS_USER" != "" ]; then if [ "$RUNAS_USER" != "root" ] && [ "$RUNAS_USER" != "" ]; then
[ "$create_user" = "root" ] && create_user="$RUNAS_USER" [ "$create_user" = "root" ] && create_user="$RUNAS_USER" || create_user="$RUNAS_USER"
[ "$create_group" = "root" ] && create_group="$RUNAS_USER" [ "$create_group" = "root" ] && create_group="$RUNAS_USER"
fi fi
create_uid="$(__get_uid "$set_user" || echo "$create_uid")" create_uid="$(__get_uid "$set_user" || echo "$create_uid")"
@ -526,7 +526,7 @@ __create_service_user() {
fi fi
if ! __check_for_user "$create_user"; then if ! __check_for_user "$create_user"; then
echo "creating system user $create_user" echo "creating system user $create_user"
useradd --force --system -u $create_uid -g $create_group -c "Account for $create_user" -d "$create_home_dir" -s /bin/false $create_user 2>/dev/stderr | tee -p -a "$LOG_DIR/init.txt" >/dev/null useradd --system -u $create_uid -g $create_group -c "Account for $create_user" -d "$create_home_dir" -s /bin/false $create_user 2>/dev/stderr | tee -p -a "$LOG_DIR/init.txt" >/dev/null
fi fi
grep -qs "$create_group" "/etc/group" || exitStatus=$((exitCode + 1)) grep -qs "$create_group" "/etc/group" || exitStatus=$((exitCode + 1))
grep -qs "$create_user" "/etc/passwd" || exitStatus=$((exitCode + 1)) grep -qs "$create_user" "/etc/passwd" || exitStatus=$((exitCode + 1))