for site in `ls -1d /hci/cis5.8/integrator/*/exec | grep exec | grep -v siteProto | cut -d"/" -f5`do echo "Stopping site $site..." /hci/cis5.8/integrator/usercmds/stop_site $site & sleep 5doneecho "Waiting..."waitecho 'Cloverleaf Jobs are done'
#!/usr/bin/kshuser=$(whoami)if [ $user != "hci" ] then echo "You must be user hci to run this script." exitfitypeset -i recnumtypeset -i errnumtypeset -i errerr=0if [[ -z $1 ]] then echo "" echo " ** Need to supply a site. Can not run without a site" echo "" exitfisite=$1autoload setrootsetroot /hci/cis5.8/integrator $sitefor proc in `hciprocstatus|sed 1,2d|cut -d" " -f1` do echo "Shutting Down Process - $proc" hcienginestop -p $proc & doneecho ""echo "nnWaiting for stopping processes..."waitecho "Stopping Deamons"hcisitectl -Kfecho ""sleep 10echo "checking to make sure that the Monitor Deamon is stopped..."echo "Checking Monitor..." if [[ -a /hci/cis5.8/integrator/$site/exec/hcimonitord/pid ]] then PID=$(cat /hci/cis5.8/integrator/$site/exec/hcimonitord/pid) echo "Checking for process id of - $PID" ps -ef | grep -q $PID if [[ $? -eq 1 ]] then echo "Site: $site is not really running even though it has a monitor daemon pid file" else echo "Killing the running Monitor Deamons" kill -9 $PID fi else echo "Monitor is not running." fisleep 10echo "Done."exit