- Timestamp:
- 2019-02-07T19:12:06+13:00 (5 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
other-projects/the-macronizer/trunk/src/scripts-and-sql/macronLogToDB.bash.in
r32752 r32753 2 2 3 3 4 ##the working directory, change this if you in diff place 5 #file_dir='/home/wjkw1/RESEARCH_2018-19/bash_test/' 4 ################################### 6 5 7 # #names of the files8 # jar_filename='testing_jar.jar'9 #log_filename='loggingtest.log' 6 # Set email_address only if you have permissions to run the mail client 7 # on your linux box 8 [email protected] #[email protected] 10 9 11 ##log file and jar file compilation12 #jar_file=$file_dir$jar_filename13 #log_file=$file_dir$log_filename14 10 15 #echo "Executing... $jar_filename"16 #java -jar $jar_file $log_file17 #echo "Finished executing $jar_filename"18 19 ###################################20 macronlogs_folder=/home/wjkw1/comp520/MacroniserLogs/tmp #/home/wjkw1/comp520/MacroniserLogs/logs #/Scratch/wjkw1/macron-restoration/web/logs21 11 #macronLogToDBjar= 22 exec_folder= /home/wjkw1/IdeaProjects/LogFileExtraction/out/production/LogFileExtraction23 processed_folder=/Scratch/wjkw1/processed #/Scratch/wjkw1/macron-restoration/processed 24 reprocess_folder=/Scratch/wjkw1/reprocess #/Scratch/wjkw1/macron-restoration/reprocess 25 errfile=/Scratch/wjkw1/macronLogToDB.err #/Scratch/wjkw1/macron-restoration/macronLogToDB.err 26 e [email protected] #[email protected]27 jars_folder= /Scratch/wjkw1/mysql-connector-java-8.0.14 #/Scratch/wjkw1/macron-restoration/web/WEB-INF/lib28 mysqlprops_folder= /Scratch/wjkw1/classes #/Scratch/wjkw1/macron-restoration/web/WEB-INF/classes12 exec_folder=@logfileproc.exec_folder@ #macronizer/web/classes (containing util.MacroniserLogFileProcessor) 13 [email protected]@ #macronizer/web/logs 14 [email protected]@/processed #/macronizer/logproc/processed 15 [email protected]@/reprocess #/macronizer/logproc/reprocess 16 e[email protected]@/macronLogToDB.err #/macronizer/logproc/macronLogToDB.err 17 jars_folder=@jarlibs.folder@ #macronizer/web/WEB-INF/lib 18 mysqlprops_folder=@classes.folder@ #/macronizer/web/WEB-INF/classes 29 19 30 20 echo "" … … 90 80 #done 91 81 92 echo "Finished processing macron.log.* files "82 echo "Finished processing macron.log.* files in $macronlogs_folder" 93 83 echo "" 84 85 # if email address provided, attempt to send email 86 #if [[ -z "${//$email_address }" ]]; then 94 87 95 88 # If error file exists and has non-zero size, send email 96 89 # https://stackoverflow.com/questions/30080997/if-file-is-exists-and-is-not-empty-always-gives-me-the-false-value 90 97 91 if [ -s $errfile ] ; then 98 92 # send email with contents of error file 99 93 echo "cat $errfile | mail -s 'Macron.log to DB cron failure output' $email_address" 100 94 # TODO: uncomment on a machine that's allowed to email 101 #cat $errfile | mail -s 'Macron.log to DB cron failure output' $email_address 102 95 #cat $errfile | mail -s 'Macron.log to DB cron failure output' $email_address 103 96 104 #echo "Supposed to have sent MAIL by now."97 echo "Supposed to have sent MAIL by now to $email_address" 105 98 fi 99 #fi 106 100 107 101
Note:
See TracChangeset
for help on using the changeset viewer.