-
Notifications
You must be signed in to change notification settings - Fork 180
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
Remove legacy, pre-0.8.3 code #1016
Conversation
Stop the allsky service on fatal errors since the next execution of allsky will also fail, getting us into an infinite loop. Exit with 100 on fatal errors for a future change where systemctl will not restart the service for error codes >= 100. Add color to some error messages
Handle exit codes 98 and 99 from the capture programs (which will be added via a separate PR). Add initial code for trying to determine if the service is restarting, versus stopping. On a restart we can display a message "Allsky software is restarting" and skip the "Allsky software is not running" message that appears when the service stops. I'm pretty sure there's a way with systemctl that allows it to send a different signal on stop versus restart. allsky.sh and the capture programs could then check which signal was sent.
First pass at removing the legacy / compatibility code.
Assume this file is used with version 0.8.3 or later, so remove the code that made it compatible with older releases. Move the functionality of the scripts/filename.sh file here, since almost every time config.sh is sourced in, so is filename.sh.
In preparation for an Allsky update script, add a variable that will tell the script when to stop looking for user-settable variables. The script will use the new config.sh file but will copy the user's settings from the old config.sh to the new file, stopping at END_OF_USER_SETTINGS.
--rotate 0 is the default
Assume this version runs with 0.8.3 so there's no need for legacy code to handle CAMERA=auto or to check for obsolete variables. This simplifies the code somewhat. Remove duplicate check for reset_usb. The functionality of scripts/filename.sh was moved to config/config.sh so no need to source in filename.sh
Also remove unneeded compatibility code
Fixes #1004 |
Its functionality was moved to config.sh
to keep workflow checker happy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No mistakes found, but not tested
@AndreasLMeg Do you think you'll have a chance to test this PR? I'm running it without any problems. |
Remove checks for CAMERA=auto.
Remove checks for obsolete variable names.
Merge functionality of scripts/filename.sh into config/config.sh (almost every script that sources in config.sh also sourced in filename.sh).