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

#
# Script name: cal_date_check
#
# Purpose: Check calibration table files to see if any are out of
# calibration based on the last calibration date. This also checks
# for any which are nearing they calibration date.
#
# Invoking arguments:
#   -days=DAYS  Days until calibration needed warnings, e.g. 30 days.
#   -dir=TABLES_DIR Directory to check for calibration files, e.g. /cell/tables
#   -config=CONFIG_FILE Configuration properties file for the checking
#      and notifying.
#
# Output:
#    Messages to standard out
#    Optionally e-mails are sent depending on the contents of the
#       configuration file.
#
# History:
#     01/10/11 - Rob Janes - Initial release
#

. configure_java

BASE=$GUI
export CLASSPATH=$BASE/applications.jar\
:$BASE/specfilegui.jar\
:$D3/mail.jar\
:$D3/activation.jar\
:$D3/jcmdline.jar\
:$BASE/cui.jar\
:$BASE/msu.jar\
:$BASE/facade.jar\
:$D3/protobuf.jar

PROP=-DPropertiesFile=$CELL/cui_properties.txt

java $PROP com.cybermetrix.cyflex.applications.caldatecheck.CalDateCheck $*
