From 5ecd10a4311df64b7a2a7a2cfc7c1f233f58a282 Mon Sep 17 00:00:00 2001 From: Ratatoskr Date: Fri, 29 Dec 2023 22:01:23 +0100 Subject: [PATCH] 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 --- wecker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wecker.sh b/wecker.sh index 5e12212..a82b2a5 100755 --- a/wecker.sh +++ b/wecker.sh @@ -1,4 +1,4 @@ -#bin/bash +#!/bin/bash # # Alarm script with brightness and color temperature adjustment for ioBroker #