awips2/nativeLib/ohd.sshp/scripts/run_SSHP_data_transfer
root e2ecdcfe33 Initial revision of AWIPS2 11.9.0-7p5
Former-commit-id: a02aeb236c [formerly 9f19e3f712] [formerly a02aeb236c [formerly 9f19e3f712] [formerly 06a8b51d6d [formerly 64fa9254b946eae7e61bbc3f513b7c3696c4f54f]]]
Former-commit-id: 06a8b51d6d
Former-commit-id: 8e80217e59 [formerly 3360eb6c5f]
Former-commit-id: 377dcd10b9
2012-01-06 08:55:05 -06:00

41 lines
No EOL
1.2 KiB
Bash

#!/bin/ksh
# file name: run_SSHP_data_transfer
# Created: 12/15/2003
# 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
# set initial lid to the first command line argument passed into the script
LID_PASSED_IN=$1
export CLASSPATH=$CLASSPATH:$DB_DRIVER_PATH
# need to add a path to the jar file for this application
CLASSPATH=$CLASSPATH:$WHFS_BIN_DIR/SiteSpecific.jar
# Java bin directory
JBINDIR=$SYS_JAVA_DIR/bin
export CONTROL_FILE=$SSHP_CONTROL_DIR/SSHPTransfer.xml
# Keeps the last 1200 lines of the log file
LOGFILE=$SSHP_LOG_DIR/SshpDataTransferMgr.log
STDLOGFILE=$SSHP_LOG_DIR/SshpDataTransferMgr.stdout.log
TMPFILE=$SSHP_LOG_DIR/SshpDataTransferMgr.tmp
tail -1200 $LOGFILE > $TMPFILE
mv $TMPFILE $LOGFILE
tail -1200 $STDLOGFILE > $TMPFILE
mv $TMPFILE $STDLOGFILE
if [[ `uname` = "Linux" ]]
then
$JBINDIR/java ohd.hseb.sshp.messaging.SshpDataTransferMgr $CONTROL_FILE $SSHP_OFS_EXTRACT_TEXT_DIR $SSHP_OFS_EXTRACT_XML_DIR $SSHP_LOG_DIR >>$STDLOGFILE 2>>$STDLOGFILE
elif [[ `uname` = "HP-UX" ]]
then
ssh -oBatchMode=yes $SSHP_JAVA_PROCESS_HOST $WHFS_BIN_DIR/run_SSHP_data_transfer >>$STDLOGFILE 2>>$STDLOGFILE
fi