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

# This script starts the external data manager for transferring files
# from external sites to Cummins.
#
# The main feature is that this insures that only one instance at a time
# is running.  If an instance is already running, it will be killed and
# a new instance started.
#
# Usage: /cyflex/cmds/start_cummins_data_loading
#
# Author: Rob Janes
# 
# History
#   08/09/11 - Rob Janes - Initial release.

# If this is already running, terminate it.
stop_cummins_data_loading

# Start the external data manager up.
DATE=`date +"%y%m%d"`
exec extdatman.cummins_data >> /data/errors/extdatman.cummins_data.$DATE 2>>/data/errors/extdatman.cummins_data.errs.$DATE &
