Skip to content

Commit

Permalink
skip wget warning (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
sharmilarama authored Jan 11, 2022
1 parent aeb1260 commit c46b685
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions dell-csi-helm-installer/verify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -370,15 +370,24 @@ function verify_authorization_proxy_server() {
WGET=$(ssh ${NODEUSER}@"${node}" "which wget")
if [ -x "${WGET}" ]; then
log info "Running wget on "${node}""
nr=1
if [ "${insecure}" == "true" ]
then
resp=$(ssh ${NODEUSER}@"${node}" wget --no-check-certificate --server-response --spider --quiet https://"${proxyHost}" 2>&1)
log info "${resp}"
code=$(echo "${resp}" | awk 'NR==1{print $2}')
if [ "${resp}" == "Warning"* ]
then
nr=2
fi
code=$(echo "${resp}" | awk -v var=$nr 'NR==var {print $2}')
else
resp=$(ssh ${NODEUSER}@"${node}" wget --server-response --spider --quiet https://"${proxyHost}" 2>&1)
log info "${resp}"
code=$(echo "${resp}" | awk 'NR==1{print $2}')
if [ "${resp}" == "Warning"* ]
then
nr=2
fi
code=$(echo "${resp}" | awk -v var=$nr 'NR==var {print $2}')
fi

if [ "${code}" != "502" ]; then
Expand Down

0 comments on commit c46b685

Please sign in to comment.