Update startapp.sh

This commit is contained in:
Dominik 2020-07-08 09:18:17 +02:00 committed by GitHub
parent 9c4bd7a4be
commit dfb6149ecd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,6 +16,12 @@ if [ -f "/run/secrets/idrac_port" ]; then
IDRAC_PORT="$(cat /run/secrets/idrac_port)" IDRAC_PORT="$(cat /run/secrets/idrac_port)"
fi fi
if [ -f "/run/secrets/idrac_vport" ]; then
echo "Using Docker secret for IDRAC_VPORT"
IDRAC_VPORT="$(cat /run/secrets/idrac_vport)"
fi
if [ -f "/run/secrets/idrac_user" ]; then if [ -f "/run/secrets/idrac_user" ]; then
echo "Using Docker secret for IDRAC_USER" echo "Using Docker secret for IDRAC_USER"
IDRAC_USER="$(cat /run/secrets/idrac_user)" IDRAC_USER="$(cat /run/secrets/idrac_user)"
@ -38,6 +44,12 @@ if [ -z "${IDRAC_PORT}" ]; then
exit 1 exit 1
fi fi
if [ -z "${IDRAC_VPORT}" ]; then
echo "${RED}Please set a proper idrac vport with IDRAC_VPORT${NC}"
sleep 2
exit 1
fi
if [ -z "${IDRAC_USER}" ]; then if [ -z "${IDRAC_USER}" ]; then
echo "${RED}Please set a proper idrac user with IDRAC_USER${NC}" echo "${RED}Please set a proper idrac user with IDRAC_USER${NC}"
sleep 2 sleep 2
@ -119,4 +131,4 @@ if [ -n "$IDRAC_KEYCODE_HACK" ]; then
export LD_PRELOAD=/keycode-hack.so export LD_PRELOAD=/keycode-hack.so
fi fi
exec java -cp avctKVM.jar -Djava.library.path="./lib" com.avocent.idrac.kvm.Main ip=${IDRAC_HOST} kmport=5900 vport=5900 user=${IDRAC_USER} passwd=${IDRAC_PASSWORD} apcp=1 version=2 vmprivilege=true "helpurl=https://${IDRAC_HOST}:443/help/contents.html" exec java -cp avctKVM.jar -Djava.library.path="./lib" com.avocent.idrac.kvm.Main ip=${IDRAC_HOST} kmport=${IDRAC_VPORT} vport=${IDRAC_VPORT} user=${IDRAC_USER} passwd=${IDRAC_PASSWORD} apcp=1 version=2 vmprivilege=true "helpurl=https://${IDRAC_HOST}:443/help/contents.html"