🗃 Modified: rootfs/usr/local/etc/docker/init.d/zz-mongo-express.sh 🗃

Modified: rootfs/usr/local/etc/docker/init.d/zz-mongo-express.sh
This commit is contained in:
casjay 2024-07-14 10:45:45 -04:00
parent 3868b7803f
commit a4d124c55c
Signed by untrusted user who does not match committer: jason
GPG Key ID: 1AB309F42A764145

View File

@ -457,7 +457,7 @@ fi
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# set switch user command
if [ "$SERVICE_USER" = "root" ] || [ -z "$SERVICE_USER" ]; then
su_cmd() { eval "$*" || return 1; }
su_cmd() { eval "$@" || return 1; }
elif [ "$(builtin type -P gosu)" ]; then
su_cmd() { gosu $SERVICE_USER "$@" || return 1; }
elif [ "$(builtin type -P runuser)" ]; then
@ -468,7 +468,7 @@ elif [ "$(builtin type -P su)" ]; then
su_cmd() { su -s /bin/sh - $SERVICE_USER -c "$@" || return 1; }
else
echo "Can not switch to $SERVICE_USER: attempting to run as root"
su_cmd() { eval "$*" || return 1; }
su_cmd() { eval "$@" || return 1; }
fi
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Change to working directory