2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-12-24 12:11:52 +00:00

Refresh functions to cope with v6-only usage

This commit is contained in:
Jarrod Johnson 2022-11-08 08:52:29 -05:00
parent 645abc2db7
commit 20e6e1e521
10 changed files with 150 additions and 30 deletions

View File

@ -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=$?

View File

@ -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=$?

View File

@ -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=$?

View File

@ -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=$?

View File

@ -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=$?

View File

@ -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=$?

View File

@ -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=$?

View File

@ -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=$?

View File

@ -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=$?

View File

@ -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=$?