Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have allsky.sh call variables.sh before starting capture #557

Merged
merged 2 commits into from
Oct 5, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions allsky.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ fi
# reset auto camera selection, so $ALLSKY_HOME/config.sh do not pick up old camera selection
cd $ALLSKY_HOME
echo "" > "$ALLSKY_HOME/autocam.sh"
source $ALLSKY_HOME/config.sh

source $ALLSKY_HOME/variables.sh
source $ALLSKY_CONFIG/config.sh

# Make it easy to find the beginning of this run in the log file.
echo " ***** Starting AllSky *****"
Expand Down Expand Up @@ -94,12 +96,12 @@ if [ $WAS_AUTO -eq 1 ]; then # Get the proper debug level since earlier config.
fi

# this must be called after camera autoselect
source $ALLSKY_HOME/scripts/filename.sh
source $ALLSKY_SCRIPTS/filename.sh

# Optionally display a notification image. This has to come after the creation of "autocam.sh" above.
USE_NOTIFICATION_IMAGES=$(jq -r '.notificationimages' "$CAMERA_SETTINGS")
if [ "$USE_NOTIFICATION_IMAGES" = "1" ] ; then
$ALLSKY_HOME/scripts/copy_notification_image.sh "StartingUp" 2>&1
$ALLSKY_SCRIPTS/copy_notification_image.sh "StartingUp" 2>&1
fi

echo "Starting allsky camera..."
Expand Down Expand Up @@ -155,11 +157,11 @@ fi
if [ "$USE_NOTIFICATION_IMAGES" = "1" -a "$RETCODE" -ne 0 ] ; then
# "capture" will do this if it exited with 0.
if [ "$RETCODE" -gt 100 ]; then
$ALLSKY_HOME/scripts/copy_notification_image.sh "Error" 2>&1
$ALLSKY_SCRIPTS/copy_notification_image.sh "Error" 2>&1
echo "*** Waiting for you to fix this. Restart when done fixing. ***"
sudo service allsky stop
else
$ALLSKY_HOME/scripts/copy_notification_image.sh "NotRunning" 2>&1
$ALLSKY_SCRIPTS/copy_notification_image.sh "NotRunning" 2>&1
fi
fi

Expand Down