#!/bin/bash x509_cert_dir="/etc/grid-security/certificates" case $1 in 0) mkdir -pv $joboption_directory/arc/certificates/ cp -rv $x509_cert_dir/ $joboption_directory/arc cat ${joboption_controldir}/job.${joboption_gridid}.proxy >$joboption_directory/user.proxy ;; 1) export X509_USER_PROXY=$RUNTIME_JOB_DIR/user.proxy export X509_USER_CERT=$RUNTIME_JOB_DIR/user.proxy export X509_CERT_DIR=$RUNTIME_JOB_DIR/arc/certificates ;; 2) : ;; esac