#! /bin/bash
cyflexlogevent -t generic -m 1 -m "script" -m "$0" 

#
# Script name: db_check URL username password [wait_period]
#
# Purpose: Check to see if a database connection is functional.
#
# Arguments:
#    Enter db_check --help
#    for details.
#
# Returns:
#    Exit status of 0 if a connection was obtained successfully.
#    Exit status of 7 if a connection was not obtained or if the attempt
#       reached the optional time-out period.
#
# History:
#    05/22/13 - Rob Janes - Initial release
#

. configure_java

# Class path.
BASE=$CYFLEX
export CLASSPATH=$GUI/specfilegui.jar\
:$D3/jcmdline.jar\
:$D3/ojdbc.jar\
:$D3/protobuf.jar

# Invoke program
PROPS=-DPropertiesFile=$CELL/cui_properties.txt
java $PROPS com.cybermetrix.cyflex.utilities.db_check $*
