From 264cf78ce5852f6dd11b59ec1507421f1b4526d7 Mon Sep 17 00:00:00 2001 From: "Dan K. Snelson" Date: Thu, 8 Feb 2024 01:14:04 -0500 Subject: [PATCH] 0.0.7-b2 Signed-off-by: Dan K. Snelson --- .../swiftDialog-Inventory-Update-Progress.zsh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Inventory Update Progress/swiftDialog-Inventory-Update-Progress.zsh b/Inventory Update Progress/swiftDialog-Inventory-Update-Progress.zsh index e6b72aa..eec45c6 100644 --- a/Inventory Update Progress/swiftDialog-Inventory-Update-Progress.zsh +++ b/Inventory Update Progress/swiftDialog-Inventory-Update-Progress.zsh @@ -53,7 +53,7 @@ export PATH=/usr/bin:/bin:/usr/sbin:/sbin # Script Version & Client-side Log -scriptVersion="0.0.7" +scriptVersion="0.0.7-b2" scriptLog="/var/log/org.churchofjesuschrist.log" # swiftDialog Binary & Logs @@ -498,7 +498,7 @@ fi # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -# Gracefully exit when less than Seconds To Wait before updating inventory +# Evaluate Seconds To Wait Before Updating Inventory # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # testFileSeconds=$( /bin/date -j -f "%s" "$(/usr/bin/stat -f "%m" $inventoryDelayFilepath)" +"%s" ) @@ -509,14 +509,13 @@ ageInSecondsHumanReadable=$( printf '"%dd, %dh, %dm, %ds"\n' $((ageInSeconds/864 if [[ ${ageInSeconds} -le ${secondsToWait} ]] && [[ ${resetConfiguration} != "All" ]]; then notice "Set to wait ${secondsToWaitHumanReadable} and inventoryDelayFilepath was created ${ageInSecondsHumanReadable} ago" - logComment "Elapsed Time: $(printf '%dh:%dm:%ds\n' $((SECONDS/3600)) $((SECONDS%3600/60)) $((SECONDS%60)))" logComment "So long!" exit 0 elif [[ ${ageInSeconds} -ge ${secondsToWait} ]]; then notice "Set to wait ${secondsToWaitHumanReadable} and inventoryDelayFilepath was created ${ageInSecondsHumanReadable} ago; proceeding …" + touch "${inventoryDelayFilepath}" elif [[ ${resetConfiguration} == "All" ]]; then notice "Reset Configuration is set to ${resetConfiguration}; proceeding …" - logComment "Set to wait ${secondsToWaitHumanReadable} and inventoryDelayFilepath was created ${ageInSecondsHumanReadable} ago; proceeding …" fi