ujetl/install_extra/run_copying_job

39 lines
865 B
Text
Raw Permalink Normal View History

2019-06-11 15:12:45 +01:00
#!/bin/bash
JOBNAME=${1:-undef}
if [ -z "${JOBNAME}" ]
then
echo "Job name not specified"
exit 1
fi
if [ ! -e "/etc/ujetl/${JOBNAME}_config_live.xml" ]
then
echo "Could not find config file for $JOBNAME"
exit 2
fi
2019-06-11 16:25:30 +01:00
LOG_PROPS=/etc/ujetl/copying_defaults_log4j.xml
if [ -e "/etc/ujetl/${JOBNAME}_log4j.xml" ]
2019-06-11 15:12:45 +01:00
then
2019-06-11 16:25:30 +01:00
echo Using log config "/etc/ujetl/${JOBNAME}_log4j.xml"
LOG_PROPS="/etc/ujetl/${JOBNAME}_log4j.xml"
2019-06-11 15:12:45 +01:00
else
echo Using default logging.
fi
#LOCKFILE=/tmp/"${JOBNAME}"_copying.lock
#/usr/bin/lockfile -r ${RETRIES:-"1"} $LOCKFILE || exit 1
#trap "rm -f $LOCKFILE; exit" INT TERM EXIT
/usr/bin/java \
-Xms1g \
-Xmx2g \
2023-07-12 09:47:21 +01:00
-Dlog4j.configurationFile="$LOG_PROPS" \
2019-06-11 15:12:45 +01:00
-cp /usr/share/ujetl/lib/CopyingApp.jar \
2019-06-11 15:48:26 +01:00
com.rasilon.ujetl.CopyingApp \
2019-06-11 15:12:45 +01:00
--config "/etc/ujetl/${JOBNAME}_config_live.xml"
#rm -f $LOCKFILE