#!/bin/sh # epilogue arguments # Script is run under uid of root # argv[1] is the jobid # argv[2] is the user's name # argv[3] is the user's group name # argv[4] is the job name # argv[5] is the session id # argv[6] is the list of resource limits specified # argv[7] is the list of resources used # argv[8] is the queue in which the job resides # argv[9] is the Account under which the job run jobid=${1} user=${2} group=${3} jobname=${4} sessionid=${5} if [ -d /var/spool/pbs/spool/${user}_${jobid} ]; then cd /var/spool/pbs/spool/${user}_${jobid} rm -rf /var/spool/pbs/spool/${user}_${jobid}/* else echo "error.." > /tmp/error-epilogue-${1} fi if [ -d /var/spool/pbs/spool/${user}_${jobid} ]; then /bin/rmdir /var/spool/pbs/spool/${user}_${jobid} else echo "error.." > /tmp/error-epilogue-${1} fi exit 0