Skip to content

Commit

Permalink
Update timelapse.sh: Fail if we can't get the first setting.
Browse files Browse the repository at this point in the history
  • Loading branch information
EricClaeys authored Aug 14, 2024
1 parent 7638340 commit 938aad5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion scripts/timelapse.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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}"
Expand Down

0 comments on commit 938aad5

Please sign in to comment.