Skip to content

Commit 7c91179

Browse files
authored
Merge pull request #1188 from oracle/fixproxyissue
try wdt download in loop
2 parents c0f7ac3 + f5d2b97 commit 7c91179

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

kubernetes/samples/scripts/create-weblogic-domain/domain-home-on-pv/wdt/create-domain-script.sh

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,19 @@ function install_wdt {
9797
cd $WDT_DIR || return 1
9898

9999
local curl_res=1
100-
for proxy in "${https_proxy}" "${https_proxy2}"; do
101-
echo @@ "Info: Downloading $WDT_INSTALL_ZIP_URL with https_proxy=\"$proxy\""
102-
https_proxy="${proxy}" \
103-
curl --silent --show-error --connect-timeout 10 -O -L $WDT_INSTALL_ZIP_URL
104-
curl_res=$?
105-
[ $curl_res -eq 0 ] && break
100+
max=20
101+
count=0
102+
while [ $curl_res -ne 0 -a $count -lt $max ] ; do
103+
sleep 10
104+
count=`expr $count + 1`
105+
for proxy in "${https_proxy}" "${https_proxy2}"; do
106+
echo @@ "Info: Downloading $WDT_INSTALL_ZIP_URL with https_proxy=\"$proxy\""
107+
https_proxy="${proxy}" \
108+
curl --silent --show-error --connect-timeout 10 -O -L $WDT_INSTALL_ZIP_URL
109+
curl_res=$?
110+
[ $curl_res -eq 0 ] && break
111+
done
106112
done
107-
108113
if [ $curl_res -ne 0 ] || [ ! -f $WDT_INSTALL_ZIP_FILE ]; then
109114
cd $save_dir
110115
echo @@ "Error: Download failed or $WDT_INSTALL_ZIP_FILE not found."

0 commit comments

Comments
 (0)