mirror of
https://github.com/rasilon/ujetl.git
synced 2026-04-11 10:29:29 +00:00
Add RPM build
This commit is contained in:
parent
bba3377b9e
commit
41f149f5ab
7 changed files with 145 additions and 46 deletions
28
install_extra/copying_defaults_log4j.properties
Normal file
28
install_extra/copying_defaults_log4j.properties
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
log4j.rootLogger=info, stdout, R, SYSLOG
|
||||
|
||||
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.stdout.Threshold=info
|
||||
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
|
||||
|
||||
# Pattern to output the caller's file name and line number.
|
||||
#log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) %d - %m%n
|
||||
log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c{2} %x - %m%n
|
||||
|
||||
log4j.appender.R=org.apache.log4j.RollingFileAppender
|
||||
log4j.appender.R.File=/tmp/DefaultCopyingApp.log
|
||||
|
||||
log4j.appender.R.MaxFileSize=100KB
|
||||
# Keep one backup file
|
||||
log4j.appender.R.MaxBackupIndex=1
|
||||
|
||||
log4j.appender.R.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.R.layout.ConversionPattern=%p %t %c %d - %m%n
|
||||
|
||||
|
||||
log4j.appender.SYSLOG=org.apache.log4j.net.SyslogAppender
|
||||
log4j.appender.SYSLOG.Threshold=info
|
||||
log4j.appender.SYSLOG.syslogHost=localhost
|
||||
log4j.appender.SYSLOG.Facility=LOCAL4
|
||||
log4j.appender.SYSLOG.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.SYSLOG.layout.conversionPattern=%d{ISO8601} %-5p [%t] %c{2} %x - %m%n
|
||||
|
||||
38
install_extra/run_copying_job
Executable file
38
install_extra/run_copying_job
Executable file
|
|
@ -0,0 +1,38 @@
|
|||
#!/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
|
||||
|
||||
LOG_PROPS=/etc/ujetl/copying_defaults_log4j.properties
|
||||
if [ -e "/etc/ujetl/${JOBNAME}_log4j.properties" ]
|
||||
then
|
||||
echo Using log config "/etc/ujetl/${JOBNAME}_log4j.properties"
|
||||
LOG_PROPS="/etc/ujetl/${JOBNAME}_log4j.properties"
|
||||
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 \
|
||||
-cp /usr/share/ujetl/lib/CopyingApp.jar \
|
||||
com.ujetl.data.CopyingApp \
|
||||
--log4j "$LOG_PROPS" \
|
||||
--config "/etc/ujetl/${JOBNAME}_config_live.xml"
|
||||
|
||||
#rm -f $LOCKFILE
|
||||
Loading…
Add table
Add a link
Reference in a new issue