#!/bin/bash timeleft=0 timeleft=$(grid-proxy-info | grep timeleft | awk -F : '{print $2 $3}') if [ ${timeleft:-0} -eq 0 ] then grid-proxy-init -cert /usr/local/pshare/gsi_certs/cert.pem -key /usr/local/pshare/gsi_certs/key.pem -hours 10000 if [ $? -ne 0 ] then echo "unable to create proxy...." echo "Create it and restart this!" fi else echo Proxy valid fi