diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/runmirrors | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/bin/runmirrors b/bin/runmirrors index 6704bae..2cbce58 100755 --- a/bin/runmirrors +++ b/bin/runmirrors @@ -61,9 +61,17 @@ PUSHARCHIVE=${PUSHARCHIVE:-"${CONF}"} PUSHDELAY=${PUSHDELAY:-240} # Which ssh key to use? KEYFILE=${KEYFILE:-".ssh/pushmirror"} +# where to send mails to +if [ "x$(hostname -s)x" != "x${MIRRORNAME%%.debian.org}x" ]; then + # We are not on a debian.org host + MAILTO=${MAILTO:-"root"} +else + # Yay, on a .debian.org host + MAILTO=${MAILTO:-"mirrorlogs@debian.org"} +fi -if ! [ -f "${KEYFILE}" ]; then - error "SSH Key ${KEYFILE} does not exist" >> ${LOG} +if ! [ -f "${BASEDIR}/${KEYFILE}" ]; then + error "SSH Key ${BASEDIR}/${KEYFILE} does not exist" >> ${LOG} exit 5 fi |