diff --git a/confluent_osdeploy/el7-diskless/profiles/default/scripts/functions b/confluent_osdeploy/el7-diskless/profiles/default/scripts/functions index d70c63db..46bb1bdb 100644 --- a/confluent_osdeploy/el7-diskless/profiles/default/scripts/functions +++ b/confluent_osdeploy/el7-diskless/profiles/default/scripts/functions @@ -1,6 +1,10 @@ #!/bin/bash function test_mgr() { - if curl -s https://${1}/confluent-api/ > /dev/null; then + whost=$1 + if [[ "$whost" == *:* ]]; then + whost="[$whost]" + fi + if curl -s https://${whost}/confluent-api/ > /dev/null; then return 0 fi return 1 @@ -58,7 +62,11 @@ fetch_remote() { fi set_confluent_vars mkdir -p $(dirname $1) - curl -f -sS $curlargs https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/$1 > $1 + whost=$confluent_mgr + if [[ "$whost" == *:* ]]; then + whost="[$whost]" + fi + curl -f -sS $curlargs https://$whost/confluent-public/os/$confluent_profile/scripts/$1 > $1 if [ $? != 0 ]; then echo $1 failed to download; return 1; fi } @@ -165,7 +173,11 @@ run_remote_python() { echo Executing in $confluentscripttmpdir cd $confluentscripttmpdir mkdir -p $(dirname $1) - curl -f -sS $curlargs https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/$1 > $1 + whost=$confluent_mgr + if [[ "$whost" == *:* ]]; then + whost="[$whost]" + fi + curl -f -sS $curlargs https://$whost/confluent-public/os/$confluent_profile/scripts/$1 > $1 if [ $? != 0 ]; then echo "'$*'" failed to download; return 1; fi confluentpython $* retcode=$? diff --git a/confluent_osdeploy/el7/profiles/default/scripts/functions b/confluent_osdeploy/el7/profiles/default/scripts/functions index d70c63db..46bb1bdb 100644 --- a/confluent_osdeploy/el7/profiles/default/scripts/functions +++ b/confluent_osdeploy/el7/profiles/default/scripts/functions @@ -1,6 +1,10 @@ #!/bin/bash function test_mgr() { - if curl -s https://${1}/confluent-api/ > /dev/null; then + whost=$1 + if [[ "$whost" == *:* ]]; then + whost="[$whost]" + fi + if curl -s https://${whost}/confluent-api/ > /dev/null; then return 0 fi return 1 @@ -58,7 +62,11 @@ fetch_remote() { fi set_confluent_vars mkdir -p $(dirname $1) - curl -f -sS $curlargs https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/$1 > $1 + whost=$confluent_mgr + if [[ "$whost" == *:* ]]; then + whost="[$whost]" + fi + curl -f -sS $curlargs https://$whost/confluent-public/os/$confluent_profile/scripts/$1 > $1 if [ $? != 0 ]; then echo $1 failed to download; return 1; fi } @@ -165,7 +173,11 @@ run_remote_python() { echo Executing in $confluentscripttmpdir cd $confluentscripttmpdir mkdir -p $(dirname $1) - curl -f -sS $curlargs https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/$1 > $1 + whost=$confluent_mgr + if [[ "$whost" == *:* ]]; then + whost="[$whost]" + fi + curl -f -sS $curlargs https://$whost/confluent-public/os/$confluent_profile/scripts/$1 > $1 if [ $? != 0 ]; then echo "'$*'" failed to download; return 1; fi confluentpython $* retcode=$? diff --git a/confluent_osdeploy/el8-diskless/profiles/default/scripts/functions b/confluent_osdeploy/el8-diskless/profiles/default/scripts/functions index d70c63db..46bb1bdb 100644 --- a/confluent_osdeploy/el8-diskless/profiles/default/scripts/functions +++ b/confluent_osdeploy/el8-diskless/profiles/default/scripts/functions @@ -1,6 +1,10 @@ #!/bin/bash function test_mgr() { - if curl -s https://${1}/confluent-api/ > /dev/null; then + whost=$1 + if [[ "$whost" == *:* ]]; then + whost="[$whost]" + fi + if curl -s https://${whost}/confluent-api/ > /dev/null; then return 0 fi return 1 @@ -58,7 +62,11 @@ fetch_remote() { fi set_confluent_vars mkdir -p $(dirname $1) - curl -f -sS $curlargs https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/$1 > $1 + whost=$confluent_mgr + if [[ "$whost" == *:* ]]; then + whost="[$whost]" + fi + curl -f -sS $curlargs https://$whost/confluent-public/os/$confluent_profile/scripts/$1 > $1 if [ $? != 0 ]; then echo $1 failed to download; return 1; fi } @@ -165,7 +173,11 @@ run_remote_python() { echo Executing in $confluentscripttmpdir cd $confluentscripttmpdir mkdir -p $(dirname $1) - curl -f -sS $curlargs https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/$1 > $1 + whost=$confluent_mgr + if [[ "$whost" == *:* ]]; then + whost="[$whost]" + fi + curl -f -sS $curlargs https://$whost/confluent-public/os/$confluent_profile/scripts/$1 > $1 if [ $? != 0 ]; then echo "'$*'" failed to download; return 1; fi confluentpython $* retcode=$? diff --git a/confluent_osdeploy/el8/profiles/default/scripts/functions b/confluent_osdeploy/el8/profiles/default/scripts/functions index d70c63db..46bb1bdb 100644 --- a/confluent_osdeploy/el8/profiles/default/scripts/functions +++ b/confluent_osdeploy/el8/profiles/default/scripts/functions @@ -1,6 +1,10 @@ #!/bin/bash function test_mgr() { - if curl -s https://${1}/confluent-api/ > /dev/null; then + whost=$1 + if [[ "$whost" == *:* ]]; then + whost="[$whost]" + fi + if curl -s https://${whost}/confluent-api/ > /dev/null; then return 0 fi return 1 @@ -58,7 +62,11 @@ fetch_remote() { fi set_confluent_vars mkdir -p $(dirname $1) - curl -f -sS $curlargs https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/$1 > $1 + whost=$confluent_mgr + if [[ "$whost" == *:* ]]; then + whost="[$whost]" + fi + curl -f -sS $curlargs https://$whost/confluent-public/os/$confluent_profile/scripts/$1 > $1 if [ $? != 0 ]; then echo $1 failed to download; return 1; fi } @@ -165,7 +173,11 @@ run_remote_python() { echo Executing in $confluentscripttmpdir cd $confluentscripttmpdir mkdir -p $(dirname $1) - curl -f -sS $curlargs https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/$1 > $1 + whost=$confluent_mgr + if [[ "$whost" == *:* ]]; then + whost="[$whost]" + fi + curl -f -sS $curlargs https://$whost/confluent-public/os/$confluent_profile/scripts/$1 > $1 if [ $? != 0 ]; then echo "'$*'" failed to download; return 1; fi confluentpython $* retcode=$? diff --git a/confluent_osdeploy/el9-diskless/profiles/default/scripts/functions b/confluent_osdeploy/el9-diskless/profiles/default/scripts/functions index d70c63db..46bb1bdb 100644 --- a/confluent_osdeploy/el9-diskless/profiles/default/scripts/functions +++ b/confluent_osdeploy/el9-diskless/profiles/default/scripts/functions @@ -1,6 +1,10 @@ #!/bin/bash function test_mgr() { - if curl -s https://${1}/confluent-api/ > /dev/null; then + whost=$1 + if [[ "$whost" == *:* ]]; then + whost="[$whost]" + fi + if curl -s https://${whost}/confluent-api/ > /dev/null; then return 0 fi return 1 @@ -58,7 +62,11 @@ fetch_remote() { fi set_confluent_vars mkdir -p $(dirname $1) - curl -f -sS $curlargs https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/$1 > $1 + whost=$confluent_mgr + if [[ "$whost" == *:* ]]; then + whost="[$whost]" + fi + curl -f -sS $curlargs https://$whost/confluent-public/os/$confluent_profile/scripts/$1 > $1 if [ $? != 0 ]; then echo $1 failed to download; return 1; fi } @@ -165,7 +173,11 @@ run_remote_python() { echo Executing in $confluentscripttmpdir cd $confluentscripttmpdir mkdir -p $(dirname $1) - curl -f -sS $curlargs https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/$1 > $1 + whost=$confluent_mgr + if [[ "$whost" == *:* ]]; then + whost="[$whost]" + fi + curl -f -sS $curlargs https://$whost/confluent-public/os/$confluent_profile/scripts/$1 > $1 if [ $? != 0 ]; then echo "'$*'" failed to download; return 1; fi confluentpython $* retcode=$? diff --git a/confluent_osdeploy/suse15-diskless/profiles/default/scripts/functions b/confluent_osdeploy/suse15-diskless/profiles/default/scripts/functions index d70c63db..46bb1bdb 100644 --- a/confluent_osdeploy/suse15-diskless/profiles/default/scripts/functions +++ b/confluent_osdeploy/suse15-diskless/profiles/default/scripts/functions @@ -1,6 +1,10 @@ #!/bin/bash function test_mgr() { - if curl -s https://${1}/confluent-api/ > /dev/null; then + whost=$1 + if [[ "$whost" == *:* ]]; then + whost="[$whost]" + fi + if curl -s https://${whost}/confluent-api/ > /dev/null; then return 0 fi return 1 @@ -58,7 +62,11 @@ fetch_remote() { fi set_confluent_vars mkdir -p $(dirname $1) - curl -f -sS $curlargs https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/$1 > $1 + whost=$confluent_mgr + if [[ "$whost" == *:* ]]; then + whost="[$whost]" + fi + curl -f -sS $curlargs https://$whost/confluent-public/os/$confluent_profile/scripts/$1 > $1 if [ $? != 0 ]; then echo $1 failed to download; return 1; fi } @@ -165,7 +173,11 @@ run_remote_python() { echo Executing in $confluentscripttmpdir cd $confluentscripttmpdir mkdir -p $(dirname $1) - curl -f -sS $curlargs https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/$1 > $1 + whost=$confluent_mgr + if [[ "$whost" == *:* ]]; then + whost="[$whost]" + fi + curl -f -sS $curlargs https://$whost/confluent-public/os/$confluent_profile/scripts/$1 > $1 if [ $? != 0 ]; then echo "'$*'" failed to download; return 1; fi confluentpython $* retcode=$? diff --git a/confluent_osdeploy/suse15/profiles/hpc/scripts/functions b/confluent_osdeploy/suse15/profiles/hpc/scripts/functions index d70c63db..46bb1bdb 100644 --- a/confluent_osdeploy/suse15/profiles/hpc/scripts/functions +++ b/confluent_osdeploy/suse15/profiles/hpc/scripts/functions @@ -1,6 +1,10 @@ #!/bin/bash function test_mgr() { - if curl -s https://${1}/confluent-api/ > /dev/null; then + whost=$1 + if [[ "$whost" == *:* ]]; then + whost="[$whost]" + fi + if curl -s https://${whost}/confluent-api/ > /dev/null; then return 0 fi return 1 @@ -58,7 +62,11 @@ fetch_remote() { fi set_confluent_vars mkdir -p $(dirname $1) - curl -f -sS $curlargs https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/$1 > $1 + whost=$confluent_mgr + if [[ "$whost" == *:* ]]; then + whost="[$whost]" + fi + curl -f -sS $curlargs https://$whost/confluent-public/os/$confluent_profile/scripts/$1 > $1 if [ $? != 0 ]; then echo $1 failed to download; return 1; fi } @@ -165,7 +173,11 @@ run_remote_python() { echo Executing in $confluentscripttmpdir cd $confluentscripttmpdir mkdir -p $(dirname $1) - curl -f -sS $curlargs https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/$1 > $1 + whost=$confluent_mgr + if [[ "$whost" == *:* ]]; then + whost="[$whost]" + fi + curl -f -sS $curlargs https://$whost/confluent-public/os/$confluent_profile/scripts/$1 > $1 if [ $? != 0 ]; then echo "'$*'" failed to download; return 1; fi confluentpython $* retcode=$? diff --git a/confluent_osdeploy/suse15/profiles/server/scripts/functions b/confluent_osdeploy/suse15/profiles/server/scripts/functions index d70c63db..46bb1bdb 100644 --- a/confluent_osdeploy/suse15/profiles/server/scripts/functions +++ b/confluent_osdeploy/suse15/profiles/server/scripts/functions @@ -1,6 +1,10 @@ #!/bin/bash function test_mgr() { - if curl -s https://${1}/confluent-api/ > /dev/null; then + whost=$1 + if [[ "$whost" == *:* ]]; then + whost="[$whost]" + fi + if curl -s https://${whost}/confluent-api/ > /dev/null; then return 0 fi return 1 @@ -58,7 +62,11 @@ fetch_remote() { fi set_confluent_vars mkdir -p $(dirname $1) - curl -f -sS $curlargs https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/$1 > $1 + whost=$confluent_mgr + if [[ "$whost" == *:* ]]; then + whost="[$whost]" + fi + curl -f -sS $curlargs https://$whost/confluent-public/os/$confluent_profile/scripts/$1 > $1 if [ $? != 0 ]; then echo $1 failed to download; return 1; fi } @@ -165,7 +173,11 @@ run_remote_python() { echo Executing in $confluentscripttmpdir cd $confluentscripttmpdir mkdir -p $(dirname $1) - curl -f -sS $curlargs https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/$1 > $1 + whost=$confluent_mgr + if [[ "$whost" == *:* ]]; then + whost="[$whost]" + fi + curl -f -sS $curlargs https://$whost/confluent-public/os/$confluent_profile/scripts/$1 > $1 if [ $? != 0 ]; then echo "'$*'" failed to download; return 1; fi confluentpython $* retcode=$? diff --git a/confluent_osdeploy/ubuntu20.04/profiles/default/scripts/functions b/confluent_osdeploy/ubuntu20.04/profiles/default/scripts/functions index d70c63db..46bb1bdb 100644 --- a/confluent_osdeploy/ubuntu20.04/profiles/default/scripts/functions +++ b/confluent_osdeploy/ubuntu20.04/profiles/default/scripts/functions @@ -1,6 +1,10 @@ #!/bin/bash function test_mgr() { - if curl -s https://${1}/confluent-api/ > /dev/null; then + whost=$1 + if [[ "$whost" == *:* ]]; then + whost="[$whost]" + fi + if curl -s https://${whost}/confluent-api/ > /dev/null; then return 0 fi return 1 @@ -58,7 +62,11 @@ fetch_remote() { fi set_confluent_vars mkdir -p $(dirname $1) - curl -f -sS $curlargs https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/$1 > $1 + whost=$confluent_mgr + if [[ "$whost" == *:* ]]; then + whost="[$whost]" + fi + curl -f -sS $curlargs https://$whost/confluent-public/os/$confluent_profile/scripts/$1 > $1 if [ $? != 0 ]; then echo $1 failed to download; return 1; fi } @@ -165,7 +173,11 @@ run_remote_python() { echo Executing in $confluentscripttmpdir cd $confluentscripttmpdir mkdir -p $(dirname $1) - curl -f -sS $curlargs https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/$1 > $1 + whost=$confluent_mgr + if [[ "$whost" == *:* ]]; then + whost="[$whost]" + fi + curl -f -sS $curlargs https://$whost/confluent-public/os/$confluent_profile/scripts/$1 > $1 if [ $? != 0 ]; then echo "'$*'" failed to download; return 1; fi confluentpython $* retcode=$? diff --git a/confluent_osdeploy/ubuntu22.04/profiles/default/scripts/functions b/confluent_osdeploy/ubuntu22.04/profiles/default/scripts/functions index d70c63db..46bb1bdb 100644 --- a/confluent_osdeploy/ubuntu22.04/profiles/default/scripts/functions +++ b/confluent_osdeploy/ubuntu22.04/profiles/default/scripts/functions @@ -1,6 +1,10 @@ #!/bin/bash function test_mgr() { - if curl -s https://${1}/confluent-api/ > /dev/null; then + whost=$1 + if [[ "$whost" == *:* ]]; then + whost="[$whost]" + fi + if curl -s https://${whost}/confluent-api/ > /dev/null; then return 0 fi return 1 @@ -58,7 +62,11 @@ fetch_remote() { fi set_confluent_vars mkdir -p $(dirname $1) - curl -f -sS $curlargs https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/$1 > $1 + whost=$confluent_mgr + if [[ "$whost" == *:* ]]; then + whost="[$whost]" + fi + curl -f -sS $curlargs https://$whost/confluent-public/os/$confluent_profile/scripts/$1 > $1 if [ $? != 0 ]; then echo $1 failed to download; return 1; fi } @@ -165,7 +173,11 @@ run_remote_python() { echo Executing in $confluentscripttmpdir cd $confluentscripttmpdir mkdir -p $(dirname $1) - curl -f -sS $curlargs https://$confluent_mgr/confluent-public/os/$confluent_profile/scripts/$1 > $1 + whost=$confluent_mgr + if [[ "$whost" == *:* ]]; then + whost="[$whost]" + fi + curl -f -sS $curlargs https://$whost/confluent-public/os/$confluent_profile/scripts/$1 > $1 if [ $? != 0 ]; then echo "'$*'" failed to download; return 1; fi confluentpython $* retcode=$?