Commit fc26e7a2 authored by Edita Kizinevic's avatar Edita Kizinevic
Browse files

Continue with another proxy if FindProxyForURL is not find

parent b39e8405
......@@ -2,7 +2,7 @@
shopt -s expand_aliases
SCRIPT_REVISION="2019-04-16, Dave Dykstra and Edita Kizinevic"
SCRIPT_REVISION="2019-08-26, Dave Dykstra and Edita Kizinevic"
# Source the CMS environment
if [ -n "$OSG_GRID" ] ; then
......@@ -122,16 +122,16 @@ check_proxies() {
done
;;
*"(proxyconfigurl="*)
if [ "$FindProxyForURL" == false ]; then
echo "Converting $proxy proxyconfigurl to proxyurl started:" `date`
if [ "$found_proxyconfig" == false ]; then
proxy_config_url=$proxy
echo "Converting $proxy_config_url proxyconfigurl to proxyurl started:" `date`
echo
echo 'select 1 from dual' | FRONTIER_LOG_LEVEL=debug FRONTIER_SERVER="$proxy(serverurl=http://cmsfrontier.cern.ch:8000/FrontierProd)(failovertoserver=no)" fn-req > $debug_output
echo 'select 1 from dual' | FRONTIER_LOG_LEVEL=debug FRONTIER_SERVER="$proxy(serverurl=http://cmsfrontier.cern.ch:8000/FrontierProd)(failovertoserver=no)" fn-req > $debug_output 2>&1
if grep -q "FindProxyForURL" $debug_output ; then
FindProxyForURL=true
found_proxyconfig=true
PROXYLIST="`sed -n '/returned "PROXY/{s/.*returned "//;s/PROXY /(proxyurl=/g;s/;/)/g;s/"/)/;p;q}' $debug_output`"
check_proxies "$PROXYLIST"
fi
PROXYLIST="`sed -n '/returned "PROXY/{s/.*returned "//;s/PROXY /(proxyurl=/g;s/;/)/g;s/"/)/;p;q}' $debug_output`"
proxy_config_url=$proxy
check_proxies "$PROXYLIST"
echo "Converting $proxy_config_url proxyconfigurl to proxyurl ended:" `date`
echo
fi
......@@ -151,7 +151,7 @@ debug_output="debug_output.txt"
output="output.txt"
ever_failed=false
ever_succeeded=false
FindProxyForURL=false
found_proxyconfig=false
found_proxy=false
check_proxies "$FNCONNECT"
......
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