diff options
author | Louise Crow <louise.crow@gmail.com> | 2012-11-12 15:06:46 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2012-11-12 15:06:46 +0000 |
commit | a1ca0f9123a3aea843ba35508a97d5a4fd5cb0db (patch) | |
tree | b9d3c1390f6b9c8b201e47507f26829b239f2773 /script/load-mail-server-logs | |
parent | 8271b2c664f04d1b68a8b4d4fdb801f5c6b00b8c (diff) | |
parent | c96b27c301023a6a1f50c12f0c387205b0255836 (diff) |
Merge remote-tracking branch 'origin/release/0.6.8'0.6.8
Conflicts:
locale/cs/app.po
locale/sl/app.po
locale/sq/app.po
locale/tr/app.po
locale/uk/app.po
Diffstat (limited to 'script/load-mail-server-logs')
-rwxr-xr-x | script/load-mail-server-logs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/script/load-mail-server-logs b/script/load-mail-server-logs new file mode 100755 index 000000000..9ff7a1401 --- /dev/null +++ b/script/load-mail-server-logs @@ -0,0 +1,27 @@ +#!/bin/bash + +LOC=`dirname "$0"` + +cd "$LOC"/.. +source commonlib/shlib/deployfns +read_conf config/general + +# Specific file if specified +if [ x$1 != x ] +then + case "$1" in + /*) f=$1 ;; + *) f=$(pwd)/$1 ;; + esac + cd "$LOC" + bundle exec ./runner 'MailServerLog.load_file("'$f'")' + exit +fi + +# Load in last three days worth of logs (if they've been modified) +cd "$LOC" +LATEST=$( ls $OPTION_MTA_LOG_PATH 2>/dev/null | sort | tail -3 ) +for X in $LATEST +do + bundle exec ./runner 'MailServerLog.load_file("'$X'")' +done |