summaryrefslogtreecommitdiff
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
parent1fcac8e4cbe4f503647f38d496055a2c1701b37f (diff)
runmirrors
define mailto use fullpath for ssh keyfile check Signed-off-by: Joerg Jaspert <joerg@debian.org>
-rwxr-xr-xbin/runmirrors12
-rw-r--r--etc/runmirrors.conf.sample5
2 files changed, 15 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
diff --git a/etc/runmirrors.conf.sample b/etc/runmirrors.conf.sample
index 4892728..2db6e18 100644
--- a/etc/runmirrors.conf.sample
+++ b/etc/runmirrors.conf.sample
@@ -28,6 +28,11 @@
## extra ssh options we might want. *hostwide*
#SSH_OPTS=""
+## The script can send logs (or error messages) to a mail address.
+## If this is unset it will default to the local root user unless it is run
+## on a .debian.org machine where it will default to the mirroradm people.
+#MAILTO="root"
+
## Whats our archive name? We will also tell our leafs about it
## This is usually empty, but if we are called as "runmirrors bpo"
## it will default to bpo. This way one runmirrors script can serve