- #===BEGIN Display Missing Files===
- missingFiles="Missing files:";
- #for key in "${!fileRollCall[@]}"; do echo "DEBUG:$key => ${fileRollCall[$key]}"; done
- for key in "${!fileRollCall[@]}"; do
- value="${fileRollCall[$key]}";
- if [ "$value" = "false" ]; then
- #echo "DEBUG:Missing files: $key => $value";
- missingFiles="$missingFiles""$key ";
- fileMissing="true";
- fi;
- done;
- if [ "$fileMissing" = "true" ]; then # Only indicate if an app is missing.
- echo "$missingFiles" 1>&2;
- fi;
- unset value;
- #===END Display Missing Files===
-
- #===BEGIN Display Missing Directories===
- missingDirs="Missing dirs:";
- #for key in "${!dirRollCall[@]}"; do echo "DEBUG:$key => ${dirRollCall[$key]}"; done
- for key in "${!dirRollCall[@]}"; do
- value="${dirRollCall[$key]}";
- if [ "$value" = "false" ]; then
- #echo "DEBUG:Missing dirs: $key => $value";
- missingDirs="$missingDirs""$key ";
- dirMissing="true";
- fi;
- done;
- if [ "$dirMissing" = "true" ]; then # Only indicate if an dir is missing.
- echo "$missingDirs" 1>&2;
- fi;
- unset value;
- #===END Display Missing Directories===
-
- #==END Display errors==
-} # Display missing apps, files, dirs
-main() {
- # Note: Use '&' to run scripts and immediately detach them.
-
- # Temperature
-
- # Pressure
-
- # Location
-
- # Photograph
- photo_script_path="$nfg_exec_dir"/update_temp_photograph.sh;
- if checkfile "$photo_script_path"; then
- timeout "$length_day_s"s /bin/bash "$photo_script_path" &
- else
- yell "ERROR:Not found:$photo_script_path";
- fi;
- displayMissing;
-} # main program
-
-#===END Declare local script functions===
-#==END Define script parameters==
-
-main "$@";