diff options
author | francis <francis> | 2009-01-27 17:12:31 +0000 |
---|---|---|
committer | francis <francis> | 2009-01-27 17:12:31 +0000 |
commit | 5c87420af4ddf89d8c22b3f82e86af11ffd1135e (patch) | |
tree | 19af11efe5e7ee338e1c3624793b95290308ac59 /script/load-exim-logs | |
parent | e5f2faeb30d736d8316fce11e3f599491764a235 (diff) |
Load exim log files into database.
Diffstat (limited to 'script/load-exim-logs')
-rwxr-xr-x | script/load-exim-logs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/script/load-exim-logs b/script/load-exim-logs new file mode 100755 index 000000000..1802d6425 --- /dev/null +++ b/script/load-exim-logs @@ -0,0 +1,21 @@ +#!/bin/bash + +LOC=`dirname $0` + +# Specific file if specified +if [ x$1 != x ] +then + $LOC/runner 'EximLog.load_file("'$1'")' + exit +fi + +# Load in last week's worth of logs (if they've been modified) +LATEST=$( ls /var/log/exim4/mainlog-* 2>/dev/null | sort | tail -7 ) +for X in $LATEST +do + echo "doing $X" + $LOC/runner 'EximLog.load_file("'$X'")' +done + + + |