diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2012-06-12 09:20:43 +0100 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2012-06-12 09:20:43 +0100 |
commit | 54fc48b9b66ce29f660064fbea3e71ea15b61d58 (patch) | |
tree | 85269b9ef4f62bce2393134981edf30adf370b05 /script/load-exim-logs | |
parent | dc14834a5d85032645f3a410faae68089fb5fe1a (diff) | |
parent | 04653b52f2233c9b4fea6b690d16a825b974d36d (diff) |
Merge branch 'release/0.6' of github.com:sebbacon/alaveteli into release/0.6
Diffstat (limited to 'script/load-exim-logs')
-rwxr-xr-x | script/load-exim-logs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/script/load-exim-logs b/script/load-exim-logs index 7e7f37a35..5ca0c66f8 100755 --- a/script/load-exim-logs +++ b/script/load-exim-logs @@ -1,21 +1,20 @@ #!/bin/bash -LOC=`dirname $0` +LOC=`dirname "$0"` # Specific file if specified if [ x$1 != x ] then - "$LOC/runner" 'EximLog.load_file("'$1'")' + f=`abspath "$1"` + cd "$LOC" + bundle exec ./runner 'EximLog.load_file("'$f'")' exit fi # Load in last three days worth of logs (if they've been modified) +cd "$LOC" LATEST=$( ls /var/log/exim4/exim-mainlog-* 2>/dev/null | sort | tail -3 ) for X in $LATEST do - # echo "doing $X" - "$LOC/runner" 'EximLog.load_file("'$X'")' + bundle exec ./runner 'EximLog.load_file("'$X'")' done - - - |