Skip to content

Commit

Permalink
0.0.7-b2
Browse files Browse the repository at this point in the history
Signed-off-by: Dan K. Snelson <[email protected]>
  • Loading branch information
dan-snelson committed Feb 8, 2024
1 parent f95a4d4 commit 264cf78
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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" )
Expand All @@ -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


Expand Down

0 comments on commit 264cf78

Please sign in to comment.