generate_proxy () { X509_USER_PROXY=${X509_USER_PROXY:-/tmp/moldynsub.x509up_u$(id -u)} export X509_USER_PROXY VO_NAME=${VO_NAME:-$VONAME} [ -z "$VO_NAME" ] && exit_error "There is no VO specified for proxy generation." local gen_proxy=1 arcproxy -I >/dev/null 2>&1 if [ $? -eq 0 ]; then arcproxy -I 2>&1 | grep -qi expired || unset gen_proxy if [ -n "$VO_FQAN" ]; then arcproxy -I 2>&1 | grep -qi "$VO_FQAN" || gen_proxy=1 fi fi if [ -n "$gen_proxy" ]; then echo_g "INFO: Generating proxy certificate for VO ${VO_NAME} ${VO_FQAN:+with FQAN $VO_FQAN}" arcproxy -S ${VO_NAME}${VO_FQAN:+:$VO_FQAN} [ $? -ne 0 ] && exit_error "Failed to generate proxy certificate." else echo_g "INFO: Proxy is already valid. Skipping proxy generation." fi } proxy_gen_params () { cat <