Refactor wecker.sh script for better readability and functionality

- Updated comments for better clarity and documentation
- Introduced a DEBUG variable to toggle debugging information
- Utilized set -e to stop the script on errors for better error handling
- Corrected the script flow to ensure proper execution of color changes
- Introduced a new ssh_command function for executing SSH commands
- Improved check_ip function for finding the IP address more reliably
- Added DEBUG checks to bypass certain functions for debugging purposes
- Fixed issues with sleep intervals during script execution
- Improved logging by adding echo statements for important steps
- Adjusted variable names for better readability
- Removed unnecessary comments and debug statements
- Added set -e for better error handling
- Introduced command-line option -d for enabling DEBUG mode
- Improved formatting and indentation for better code readability
This commit is contained in:
Ratatoskr 2023-12-29 22:01:23 +01:00
parent 3d2605a8f8
commit 5ecd10a431
Signed by: Ratatoskr
GPG Key ID: 28B77439A6D78F4E

View File

@ -1,4 +1,4 @@
#bin/bash #!/bin/bash
# #
# Alarm script with brightness and color temperature adjustment for ioBroker # Alarm script with brightness and color temperature adjustment for ioBroker
# #