Commit d6509c1c authored by Andrea Sciaba's avatar Andrea Sciaba
Browse files

added timeout to curl

parent 3431c3c6
......@@ -69,7 +69,6 @@ echo "Printing CMS site local config information..."
echo
echo Hostname: `hostname`
tmpfile=`mktemp /tmp/tmp.XXXXXXXXXX`
echo "SCRAM_ARCH: $SCRAM_ARCH"
source $SW_DIR/cmsset_default.sh > $tmpfile 2>&1
result=$?
echo "SCRAM_ARCH: $SCRAM_ARCH"
......
......@@ -53,14 +53,14 @@ if [ $useSquid == 1 ] ; then
fi
wgetOutput=`mktemp`
cmd="curl --fail --request GET --header \"PRIVATE-TOKEN: kuD9s3WrDGNXZ8BvxFV2\" $url -o $file"
cmd="curl --connect-timeout 30 -m 30 --fail --request GET --header \"PRIVATE-TOKEN: kuD9s3WrDGNXZ8BvxFV2\" $url -o $file"
cmdFile=`mktemp`
echo "$cmd > $wgetOutput 2>&1" > $cmdFile
source $cmdFile
rc=$?
if [ $rc != 0 ] ; then
echo "wget error code: $rc"
echo "curl error code: $rc"
cat $wgetOutput
if [ $useSquid == 0 ] ; then
echo "ERROR: Failed to retrieve $file from $url"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment