From 2a1dac448aabb81b665c636ac04b1445e3eb94a1 Mon Sep 17 00:00:00 2001 From: Tim Eertmoed Date: Mon, 28 Oct 2024 19:47:12 +0100 Subject: [PATCH] usr/bin/custom/watchdog-monitor aktualisiert --- usr/bin/custom/watchdog-monitor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr/bin/custom/watchdog-monitor b/usr/bin/custom/watchdog-monitor index fdee08f..dc6c0a4 100644 --- a/usr/bin/custom/watchdog-monitor +++ b/usr/bin/custom/watchdog-monitor @@ -28,9 +28,9 @@ update_watchdog_config() { # Set interval echo "interval = 59" | sudo tee -a "$config_file" > /dev/null + if [ ${#ip_array[@]} -eq 0 ]; then echo "No IP addresses found. Watchdog configuration cleared." >> "$log_file" - return 0 # Indicate that no IP addresses were found else for ip in "${ip_array[@]}"; do echo "ping = $ip" | sudo tee -a "$config_file" > /dev/null