From a52eacc4c9beea9f89c0d983eb37c9c8acccd214 Mon Sep 17 00:00:00 2001 From: EricClaeys <83164203+EricClaeys@users.noreply.github.com> Date: Thu, 20 Jan 2022 12:42:31 -0600 Subject: [PATCH 1/3] endOfNight.sh: aid in debugging Add completion messages to log to make it easy to see when the commands finished. --- scripts/endOfNight.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/endOfNight.sh b/scripts/endOfNight.sh index 87dc86947..06a3bda92 100755 --- a/scripts/endOfNight.sh +++ b/scripts/endOfNight.sh @@ -43,6 +43,7 @@ if [[ ${KEOGRAM} == "true" ]]; then if [[ ${UPLOAD_KEOGRAM} == "true" && ${RET} = 0 ]] ; then "${ALLSKY_SCRIPTS}/generateForDay.sh" --upload -k ${DATE} fi + echo -e "${ME}: ===== Keogram complete" fi # Generate startrails from collected images. @@ -53,6 +54,7 @@ if [[ ${STARTRAILS} == "true" ]]; then if [[ ${UPLOAD_KEOGRAM} == "true" && ${?} = 0 ]] ; then "${ALLSKY_SCRIPTS}/generateForDay.sh" --upload -s ${DATE} fi + echo -e "${ME}: ===== Startrails complete" fi # Generate timelapse from collected images. @@ -64,6 +66,7 @@ if [[ ${TIMELAPSE} == "true" ]]; then if [[ ${UPLOAD_VIDEO} == "true" && ${?} = 0 ]] ; then "${ALLSKY_SCRIPTS}/generateForDay.sh" --upload -t ${DATE} fi + echo -e "${ME}: ===== Timelapse complete" fi # Run custom script at the end of a night. This is run BEFORE the automatic deletion From ae972d60627017125a9376040dee68d408bd9df1 Mon Sep 17 00:00:00 2001 From: EricClaeys <83164203+EricClaeys@users.noreply.github.com> Date: Thu, 20 Jan 2022 20:34:26 -0600 Subject: [PATCH 2/3] endOfNight.sh - moved messages Put the "completed" messages directly after the generation of the images. On upload, the upload script displays messages. --- scripts/endOfNight.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/endOfNight.sh b/scripts/endOfNight.sh index 06a3bda92..c98839b2a 100755 --- a/scripts/endOfNight.sh +++ b/scripts/endOfNight.sh @@ -40,10 +40,10 @@ if [[ ${KEOGRAM} == "true" ]]; then echo -e "${ME}: ===== Generating Keogram" "${ALLSKY_SCRIPTS}/generateForDay.sh" --silent -k ${DATE} RET=$? + echo -e "${ME}: ===== Keogram complete" if [[ ${UPLOAD_KEOGRAM} == "true" && ${RET} = 0 ]] ; then "${ALLSKY_SCRIPTS}/generateForDay.sh" --upload -k ${DATE} fi - echo -e "${ME}: ===== Keogram complete" fi # Generate startrails from collected images. @@ -51,10 +51,11 @@ fi if [[ ${STARTRAILS} == "true" ]]; then echo -e "${ME}: ===== Generating Startrails" "${ALLSKY_SCRIPTS}/generateForDay.sh" --silent -s ${DATE} + RET=$? + echo -e "${ME}: ===== Startrails complete" if [[ ${UPLOAD_KEOGRAM} == "true" && ${?} = 0 ]] ; then "${ALLSKY_SCRIPTS}/generateForDay.sh" --upload -s ${DATE} fi - echo -e "${ME}: ===== Startrails complete" fi # Generate timelapse from collected images. @@ -63,10 +64,11 @@ fi if [[ ${TIMELAPSE} == "true" ]]; then echo -e "${ME}: ===== Generating Timelapse" "${ALLSKY_SCRIPTS}/generateForDay.sh" --silent -t ${DATE} + RET=$? + echo -e "${ME}: ===== Timelapse complete" if [[ ${UPLOAD_VIDEO} == "true" && ${?} = 0 ]] ; then "${ALLSKY_SCRIPTS}/generateForDay.sh" --upload -t ${DATE} fi - echo -e "${ME}: ===== Timelapse complete" fi # Run custom script at the end of a night. This is run BEFORE the automatic deletion From 79d16ed5981b451ae5c39356b89e1e710f0597e8 Mon Sep 17 00:00:00 2001 From: EricClaeys <83164203+EricClaeys@users.noreply.github.com> Date: Thu, 20 Jan 2022 20:36:57 -0600 Subject: [PATCH 3/3] endOfNight.sh: use $RET Dang it. I forgot to replace $? with $RET. --- scripts/endOfNight.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/endOfNight.sh b/scripts/endOfNight.sh index c98839b2a..402d4834d 100755 --- a/scripts/endOfNight.sh +++ b/scripts/endOfNight.sh @@ -53,7 +53,7 @@ if [[ ${STARTRAILS} == "true" ]]; then "${ALLSKY_SCRIPTS}/generateForDay.sh" --silent -s ${DATE} RET=$? echo -e "${ME}: ===== Startrails complete" - if [[ ${UPLOAD_KEOGRAM} == "true" && ${?} = 0 ]] ; then + if [[ ${UPLOAD_KEOGRAM} == "true" && ${RET} = 0 ]] ; then "${ALLSKY_SCRIPTS}/generateForDay.sh" --upload -s ${DATE} fi fi @@ -66,7 +66,7 @@ if [[ ${TIMELAPSE} == "true" ]]; then "${ALLSKY_SCRIPTS}/generateForDay.sh" --silent -t ${DATE} RET=$? echo -e "${ME}: ===== Timelapse complete" - if [[ ${UPLOAD_VIDEO} == "true" && ${?} = 0 ]] ; then + if [[ ${UPLOAD_VIDEO} == "true" && ${RET} = 0 ]] ; then "${ALLSKY_SCRIPTS}/generateForDay.sh" --upload -t ${DATE} fi fi