From 938aad5d2b052aa9097b4a2e716373f44dd686dd Mon Sep 17 00:00:00 2001 From: Eric Claeys <83164203+EricClaeys@users.noreply.github.com> Date: Tue, 13 Aug 2024 20:03:41 -0600 Subject: [PATCH] Update timelapse.sh: Fail if we can't get the first setting. --- scripts/timelapse.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/timelapse.sh b/scripts/timelapse.sh index c4c396214..7757a8770 100755 --- a/scripts/timelapse.sh +++ b/scripts/timelapse.sh @@ -137,6 +137,14 @@ else fi fi +if ! KEEP_SEQUENCE="$( settings ".timelapsekeepsequence" 2>&1 )" ; then + # The settings file may not exist or may be corrupt. + echo -e "${RED}*** ${ME} ERROR: Unable to get .timelapsekeepsequence:" + echo "${KEEP_SEQUENCE}" + echo -e "${NC}" + exit 4 +fi + MY_PID="$$" if [[ ${DEBUG} == "true" ]]; then # Output one string so it's all on one line in log file. @@ -213,7 +221,6 @@ fi TMP="${ALLSKY_TMP}/timelapseTMP.txt" [[ ${IS_MINI} == "false" ]] && : > "${TMP}" # Only create when NOT doing mini-timelapses -KEEP_SEQUENCE="$( settings ".timelapsekeepsequence" )" if [[ ${KEEP_SEQUENCE} == "false" || ! -d ${SEQUENCE_DIR} ]]; then rm -fr "${SEQUENCE_DIR}" mkdir -p "${SEQUENCE_DIR}"