summaryrefslogtreecommitdiff
path: root/bin/runmirrors
diff options
context:
space:
mode:
authorJoerg Jaspert <joerg@debian.org>2008-11-19 19:59:09 +0100
committerJoerg Jaspert <joerg@debian.org>2008-11-19 19:59:09 +0100
commit444d89c18d58592a1580d8c6aa8867b50f8eb462 (patch)
treea225860220b89faf094aa7044d610bc320afca2a /bin/runmirrors
parent1fcac8e4cbe4f503647f38d496055a2c1701b37f (diff)
runmirrors
define mailto use fullpath for ssh keyfile check Signed-off-by: Joerg Jaspert <joerg@debian.org>
Diffstat (limited to 'bin/runmirrors')
-rwxr-xr-xbin/runmirrors12
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