-
Notifications
You must be signed in to change notification settings - Fork 173
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
postToMap.sh updates #1087
Merged
Merged
postToMap.sh updates #1087
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Collaborator
EricClaeys
commented
Mar 23, 2022
- See individual commit comments for a list of the many changes.
* Use { } around variable names * Use "<" instead of `cat`
* Use tabs with 4-character tabstop instead of spaces. * Use { } around variables. * Include ${ME} on all output statements.
To be consistent with other scripts, output information if called from the command line (i.e., ON_TTY = 1) or we're at the correct debug level.
* Check return code from curl. * Check return from server script. * Exit with non-zero code upon error. * Use --silent option to curl to hide the progress information.
* Added `--delete` to delete map data * Added `--help` to be consistent with other scripts that accept arguments * Added `--debug` to aid in debugging * Added missing "; then"
* Remove unused "OK" * Added missing "; then"
* Check for required options and exit if not found. * Check for suggested options and display warning if not there, but continue. * Added missing "-e" and missing comma. * Always upload on delete. * Fixed how ${CMD} is executed.
* Implement "--force" to force an update - useful if it's the wrong day. * Disabled some shellcheck errors. * Save the full output from curl for use in error messages. * Check for null reply from server.
* Check for additional required fields. * Fixed bug with -n versus -z. * Check for errors * Improved message for "ALREADY UPDATED".
* --delete and --force both override the day check, so the old message is now misleading.
* Added "--whisper" argument to only display action taken and nothing else. * Colors either use ${RED} or <span>, depending on who invokes us. *
* This script is called by the WebUI when a setting changed, and that change should cause an action to be taken.
* In order for the WebUI to call postData.sh, it needs to do it via sudo. This requires an entry in the sudoers file, which this installation script now creates if not there. * Also added some shellcheck fixes.
* Because this is in $ALLSKY_SCRIPTS, set a placeholder for the actual location, which is replaced by the installation script.
* "postData.sh" is the newest entry in the sudoers file, so check for it instead of vcgencmd which used to be the newest entry.
thomasjacquin
approved these changes
Mar 23, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.