#!/bin/ksh # File name: run_pdc_pp # This allows you to run this script from outside of ./bin RUN_FROM_DIR=`dirname $0` # set up SOME environment variables for WHFS applications . $RUN_FROM_DIR/../../set_hydro_env export CONNECTION_STRING=$JDBCURL #export CONNECTION_STRING=jdbc:postgresql://lx1-nhdr:5432/hd_ob6rhax?user=oper #get java dir export SYS_JAVA_DIR=$($GAD_DIR/get_apps_defaults$OS_SUFFIX sys_java_dir) export SYS_JAVA_BIN_DIR=$SYS_JAVA_DIR/bin #truncate the preprocessor log export LOGFILE=$PDC_PP_LOG_DIR/PDCPreprocessor.log export LOGFILE_TMP=$PDC_PP_LOG_DIR/PDCPreprocessor.tmp tail -12000 $LOGFILE > $LOGFILE_TMP mv $LOGFILE_TMP $LOGFILE # set java classpath export CLASSPATH=$DB_DRIVER_PATH:$WHFS_BIN_DIR/pdc_pp.jar AMIRUNNING_DIR=$PDC_PP_LOG_DIR . /awips/hydroapps/public/bin/amirunning if [[ $AmIRunning = "yes" ]] then echo Startup cancelled because of prior running instance >> $LOGFILE exit 1 fi #Execute the PDC Preprocessor $SYS_JAVA_BIN_DIR/java ohd.hseb.pdc_pp.PDCPreprocessor $CONNECTION_STRING $1 >>$LOGFILE 2>&1 exit