#!/bin/bash java -DMGROOT=`pwd`/../../ -cp ../../lib/log4j.jar:../../lib/ourgrid.jar:. FactoryOnGrid mygrid status ret=$? if [ $ret -eq 72 ]; then echo "Could not start MyGrid..." exit 1 else echo fi echo echo # Waiting for job to finish sleep 20 echo "Waiting for job to finish..." echo numTasks=3 mygrid waitforjob 1 if [ `ls -l output* | wc -l` -ge $numTasks ]; then echo "MyGrid is working OK" else echo "MyGrid failed" fi echo mygrid stop