diff options
author | Simon Paillard <spaillard@debian.org> | 2013-09-20 22:40:00 +0200 |
---|---|---|
committer | Simon Paillard <spaillard@debian.org> | 2013-10-15 00:21:08 +0200 |
commit | d922c4e0a421cab25dd2d5a99837c9f6029e2d94 (patch) | |
tree | ce796f70bf6a3946fd2f469827f3b77f766956f7 /bin | |
parent | cb2e07093daf737ac34dd9827a5ff96c34f72f79 (diff) |
Handling of trigger errors: fix logging and email reports
- No separate log file for errors
- One mail per faulty pushed mirror
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/runmirrors | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/runmirrors b/bin/runmirrors index 93922b6..a84c27b 100755 --- a/bin/runmirrors +++ b/bin/runmirrors @@ -117,6 +117,10 @@ PUSHARCHIVE=${PUSHARCHIVE:-"${CONF}"} PUSHDELAY=${PUSHDELAY:-600} # Which ssh key to use? KEYFILE=${KEYFILE:-".ssh/pushmirror"} + +# start a new log +savelog "${LOG}" > /dev/null + # where to send mails to if [ "x$(hostname -d)x" != "xdebian.orgx" ]; then # We are not on a debian.org host @@ -146,7 +150,7 @@ umask 022 mkdir -p "${LOGDIR}" mkdir -p "${LOCKDIR}" -trap 'log "Mirrorpush done" >> "${LOG}"; savelog "${LOG}" > /dev/null' EXIT +trap 'log "Mirrorpush done" >> "${LOG}"' EXIT log "Pushing leaf mirrors. Inside ftpsync: ${FROMFTPSYNC}. Pushkind: ${PUSHKIND}" >> "${LOG}" |