From 86722a8e8ad0ab8fff34592c3b701db682dd9e23 Mon Sep 17 00:00:00 2001 From: Alex Barcelo Date: Mon, 13 Dec 2021 21:56:45 +0100 Subject: [PATCH] defining target_time variable in that branch --- install/etc/services.available/10-db-backup/run | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install/etc/services.available/10-db-backup/run b/install/etc/services.available/10-db-backup/run index d01075b..7bf4ac9 100755 --- a/install/etc/services.available/10-db-backup/run +++ b/install/etc/services.available/10-db-backup/run @@ -438,9 +438,10 @@ print_debug "Backup routines Initialized on $(date)" today=$(date +"%Y%m%d") if [[ $DB_DUMP_BEGIN =~ ^\+(.*)$ ]]; then - waittime=$(( ${BASH_REMATCH[1]} * 60 )) + waittime=$(( ${BASH_REMATCH[1]} * 60 )) + target_time=$(($current_time + $waittime)) else - target_time=$(date --date="${today}${DB_DUMP_BEGIN}" +"%s") + target_time=$(date --date="${today}${DB_DUMP_BEGIN}" +"%s") if [[ "$target_time" < "$current_time" ]]; then target_time=$(($target_time + 24*60*60)) fi