mirror of
https://github.com/sipeed/NanoKVM.git
synced 2026-09-11 00:22:56 -05:00
21 lines
289 B
Bash
Executable File
21 lines
289 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
set -u
|
|
|
|
: "${UID:=0}"
|
|
: "${GID:=${UID}}"
|
|
|
|
if [ "$#" = 0 ]
|
|
then set -- "$(command -v bash 2>/dev/null || command -v sh)" -l
|
|
fi
|
|
|
|
if [ "$UID" != 0 ]
|
|
then
|
|
set -- gosu "${UID}:${GID}" env HOME="/home/$DOCKER_USER" "${@}"
|
|
else
|
|
export HOME=/root
|
|
fi
|
|
|
|
exec "$@"
|