From d29d28ebc094b9d2926faf906135ac9606f0484d Mon Sep 17 00:00:00 2001 From: Eric Claeys <83164203+EricClaeys@users.noreply.github.com> Date: Mon, 12 Aug 2024 11:50:40 -0600 Subject: [PATCH 1/2] Update options.json.repo: Add "checkchanges" to days to keep settings In preparation for comparing to number of days of images that exist --- config_repo/options.json.repo | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config_repo/options.json.repo b/config_repo/options.json.repo index 7dc3a13e9..092aa9e09 100644 --- a/config_repo/options.json.repo +++ b/config_repo/options.json.repo @@ -566,6 +566,7 @@ "label" : "Days To Keep", "type" : "integer", "carryforward" : true, +"checkchanges" : true, "booldependson" : "savedaytimeimages OR savenighttimeimages" }, { @@ -1806,6 +1807,7 @@ "label" : "Days To Keep on Pi Website", "type" : "integer", "carryforward" : true, +"checkchanges" : true, "booldependson" : "uselocalwebsite" }, { @@ -1831,6 +1833,7 @@ "label" : "Days To Keep on Remote Website", "type" : "integer", "carryforward" : true, +"checkchanges" : true, "booldependson" : "useremotewebsite", "display" : false }, From ed9672c5389ac787b50db9552889fb7ca1d8185a Mon Sep 17 00:00:00 2001 From: Eric Claeys <83164203+EricClaeys@users.noreply.github.com> Date: Mon, 12 Aug 2024 11:58:29 -0600 Subject: [PATCH 2/2] Update makeChanges.sh: Add "TODO" section for daystokeep Will be completed in point release 1 --- scripts/makeChanges.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/makeChanges.sh b/scripts/makeChanges.sh index 762a5f573..f0dbbf1a8 100755 --- a/scripts/makeChanges.sh +++ b/scripts/makeChanges.sh @@ -778,6 +778,15 @@ do fi ;; + "daystokeep" | "daystokeeplocalwebsite" | "daystokeepremotewebsite") + if [[ ${NEW_VALUE} -gt 0 ]]; then +: # TODO: Check how many days images there are of the specified type. + # For remote website, query the website for the number (to be implemented). + # If MORE than NEW_VALUE, warn the user since those images will be deleted + # at the next endOfNight.sh run. + fi + ;; + "uselogin") if [[ ${NEW_VALUE} == "false" ]]; then MSG="${wWARNING}WARNING: "