Allow specifying port for iDRAC host

This commit is contained in:
Dominik 2018-11-19 15:49:34 +01:00
parent 23d8947d34
commit 01ca40595c
2 changed files with 11 additions and 4 deletions

View File

@ -1,6 +1,7 @@
FROM jlesage/baseimage-gui:alpine-3.7 FROM jlesage/baseimage-gui:alpine-3.7
ENV APP_NAME="iDRAC 6" ENV APP_NAME="iDRAC 6" \
IDRAC_PORT=443
RUN apk add --no-cache openjdk7-jre RUN apk add --no-cache openjdk7-jre

View File

@ -11,6 +11,12 @@ if [ -z "${IDRAC_HOST}" ]; then
exit 1 exit 1
fi fi
if [ -z "${IDRAC_PORT}" ]; then
echo -e "${RED}Please set a proper idrac port with IDRAC_PORT${NC}"
sleep 2
exit 1
fi
if [ -z "${IDRAC_USER}" ]; then if [ -z "${IDRAC_USER}" ]; then
echo -e "${RED}Please set a proper idrac user with IDRAC_USER${NC}" echo -e "${RED}Please set a proper idrac user with IDRAC_USER${NC}"
sleep 2 sleep 2
@ -33,7 +39,7 @@ mkdir lib
echo "Downloading required files" echo "Downloading required files"
if [ ! -f avctKVM.jar ]; then if [ ! -f avctKVM.jar ]; then
wget https://${IDRAC_HOST}/software/avctKVM.jar --no-check-certificate wget https://${IDRAC_HOST}:${IDRAC_PORT}/software/avctKVM.jar --no-check-certificate
if [ ! $? -eq 0 ]; then if [ ! $? -eq 0 ]; then
echo -e "${RED}Failed to download avctKVM.jar, please check your settings${NC}" echo -e "${RED}Failed to download avctKVM.jar, please check your settings${NC}"
@ -43,7 +49,7 @@ if [ ! -f avctKVM.jar ]; then
fi fi
if [ ! -f lib/avctKVMIOLinux64.jar ]; then if [ ! -f lib/avctKVMIOLinux64.jar ]; then
wget -O lib/avctKVMIOLinux64.jar https://${IDRAC_HOST}/software/avctKVMIOLinux64.jar --no-check-certificate wget -O lib/avctKVMIOLinux64.jar https://${IDRAC_HOST}:${IDRAC_PORT}/software/avctKVMIOLinux64.jar --no-check-certificate
if [ ! $? -eq 0 ]; then if [ ! $? -eq 0 ]; then
echo -e "${RED}Failed to download avctKVMIOLinux64.jar, please check your settings${NC}" echo -e "${RED}Failed to download avctKVMIOLinux64.jar, please check your settings${NC}"
@ -53,7 +59,7 @@ if [ ! -f lib/avctKVMIOLinux64.jar ]; then
fi fi
if [ ! -f lib/avctVMLinux64.jar ]; then if [ ! -f lib/avctVMLinux64.jar ]; then
wget -O lib/avctVMLinux64.jar https://${IDRAC_HOST}/software/avctVMLinux64.jar --no-check-certificate wget -O lib/avctVMLinux64.jar https://${IDRAC_HOST}:${IDRAC_PORT}/software/avctVMLinux64.jar --no-check-certificate
if [ ! $? -eq 0 ]; then if [ ! $? -eq 0 ]; then
echo -e "${RED}Failed to download avctVMLinux64.jar, please check your settings${NC}" echo -e "${RED}Failed to download avctVMLinux64.jar, please check your settings${NC}"