aboutsummaryrefslogtreecommitdiffstats
path: root/script
diff options
context:
space:
mode:
Diffstat (limited to 'script')
-rwxr-xr-xscript/load-exim-logs21
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
+
+
+