mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-10 21:03:01 +00:00
Make install_wifi_monitor.sh handle errors more gracefully: 1. Remove unnecessary sudo when running as root: - Check EUID before using sudo for systemctl commands - Use systemctl directly when running as root - Use sudo only when running as regular user 2. Add error handling for package installation: - Continue even if apt update fails (just warn) - Continue even if apt install fails (warn and provide manual install command) - Allow installation to continue even if packages fail 3. Make service operations more resilient: - Remove sudo when running as root - Allow service start to fail without exiting script - Print warning if service fails to start - Service will still be enabled and may start on reboot Note: Script still uses 'set -e' but errors in critical paths are handled with || operators to prevent exit. This prevents the script from exiting with code 1 when called from first_time_install.sh, allowing the installation to continue even if some WiFi-related operations fail.