From fcf661b43a9cfa52a66f0ab18a2c4c21babfbdc3 Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Thu, 31 Oct 2019 17:18:50 +1100 Subject: cron: Fix the SMTP host on sync. --- rtems-release-cron | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/rtems-release-cron b/rtems-release-cron index 8ab2594..d3bb06e 100755 --- a/rtems-release-cron +++ b/rtems-release-cron @@ -47,14 +47,29 @@ rtems_snapshot=$(date +"m%y%m") # Email addresses # from="chrisj@rtems.org" + +# +# If not live use dummy addresses. +# if [ ${live} = yes ]; then build_to="build@rtems.org" announce_to="users@rtems.org,devel@rtems.org" - smtphost="--smtp-host=192.168.80.141" else build_to="chrisj@rtems.org" announce_to="chrisj@rtems.org" fi + +# +# Supported SMTP hosts. +# +case $(hostname) in + sync.rtems.org) + smtphost="--smtp-host=192.168.80.141" + ;; + *) + ;; +esac + # # Announce template # @@ -66,7 +81,7 @@ announce="snapshot-announce.txt" if [ ${live} = yes ]; then upload_path="/data/ftp/pub/rtems/releases" else - upload_path="/xdata/ftp/pub/rtems/releases" + upload_path="/data/ftp/pub/rtems/people/chrisj/releases" fi # @@ -107,9 +122,14 @@ BUILD_LOG=rtems-release-build-log-${rtems_snapshot}.txt # LOCK=.cron-lock-rtems-release +# +# Clean up file list. +# +CLEANUP_FILES="${LOCK} ${BUILD_LOG} ${announce} ARCH-BSP.txt" + if [ ! -f ${LOCK} ]; then - trap "rm -f ${LOCK} ${BUILD_LOG} ${announce}" EXIT - trap "rm -f ${LOCK} ${BUILD_LOG} ${announce}; exit 1" INT TERM STOP INFO USR1 USR2 + trap "rm -f ${CLEANUP_FILES}" EXIT + trap "rm -f ${CLEANUP_FILES}; exit 1" INT TERM STOP INFO USR1 USR2 touch ${LOCK} echo "RTEMS Release Cron builder, v${rtems_release_version} (${git_hash})" > ${BUILD_LOG} echo "" >> ${BUILD_LOG} -- cgit v1.2.3