From cb8716913ebd9e22be8cf0940acdf24fad6a7d98 Mon Sep 17 00:00:00 2001 From: Adrian Reber Date: Wed, 6 May 2015 12:53:59 +0000 Subject: [PATCH] Remember the start time of the last umdl run The script which checks if umdl should be run used to store the time of the end of the current umdl run. It actually should remember the time of the start of this run as we want to make sure to pick up all changes since the start of the current run. Also print the date and time in the same line as the logging. --- roles/mirrormanager/backend/files/umdl-required | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/roles/mirrormanager/backend/files/umdl-required b/roles/mirrormanager/backend/files/umdl-required index ace09a050e..3497fa569b 100644 --- a/roles/mirrormanager/backend/files/umdl-required +++ b/roles/mirrormanager/backend/files/umdl-required @@ -27,19 +27,18 @@ if [ "$?" -ne "0" ]; then exit 0 fi +echo -n "Last sync more than ${DELTA} seconds ago. Running umdl at " date -echo "Last sync more than ${DELTA} seconds ago. Running umdl" /usr/local/bin/lock-wrapper umdl /usr/bin/mm2_update-master-directory-list if [ "$?" -eq "0" ]; then # success! remember the date of this run - CURDATE=`date +%s` echo "LASTRUN=${CURDATE}" > /var/run/mirrormanager/umdl + echo -n "Finished umdl successfully at " date - echo "Finished umdl successfully" exit 0 fi +echo -n "umdl returned not zero. Something failed. Please check umdl.log. " date -echo "umdl returned not zero. Something failed. Please check umdl.log"