#set -x %manual ###################################################################### # Purpose: Copy the ecflow code and status to the other ecflow host. # If this is sdecflow1, copy to tdecflow2, and vise versa. # Change log: # Freeman - s/ECF_NODE/ECF_HOST/g ###################################################################### ###################################################################### # Job specific troubleshooting instructions: # see generic troubleshoot manual page # ###################################################################### # include manual page below %end if [ -d /opt/modules ]; then . /opt/modules/default/init/bash else . /usrx/local/Modules/default/init/bash fi module load ecflow export ECF_PORT=%ECF_PORT% export ECF_HOST=%ECF_HOST% export ECF_NAME=%ECF_NAME% export ECF_PASS=%ECF_PASS% export ECF_TRYNO=%ECF_TRYNO% export ECF_RID=$$ ecflow_client --init=${ECF_RID} set -x date err=0 copyTo="" echo "===========================" if [ $SITE == "SURGE" ]; then echo This is surge, copy to tide copyTo=tdecflow2 elif [ $SITE == "TIDE" ]; then echo This is tide, copy to surge copyTo=sdecflow1 else echo This is not tide or surge. Exit. exit fi echo "===========================" echo echo rsync -a /u/mag.dev/ecfnets ${copyTo}:/u/mag.dev rsync -a /u/mag.dev/ecfnets ${copyTo}:/u/mag.dev echo scp /u/mag.dev/ecf.check ${copyTo}:/u/mag.dev scp /u/mag.dev/ecf.check ${copyTo}:/u/mag.dev date if test $err -eq '0' then ecflow_client --complete else ecflow_client --abort fi exit