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.
This commit is contained in:
parent
c7f31e41bb
commit
cb8716913e
1 changed files with 3 additions and 4 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue