- Corrected the service restart commands to use the proper syntax for stopping and starting the WAN interface.
- Improved the ping test logic to return success or failure directly, simplifying the main script execution.
- Enhanced error logging by redirecting standard error output to the log file during the ping test.
- Streamlined the ping command to use the configured PING_HOST variable directly.
- Ensured that the script properly handles return values from the ping test function.
These changes improve the reliability and clarity of the WAN monitoring functionality.