From 3cd8e0bea65c77847f10c4343480a03eb0d52df7 Mon Sep 17 00:00:00 2001 From: Tim Eertmoed Date: Sun, 27 Oct 2024 18:23:34 +0100 Subject: [PATCH] usr/bin/watchdog aktualisiert --- usr/bin/watchdog | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr/bin/watchdog b/usr/bin/watchdog index 9e34575..af5ff4c 100644 --- a/usr/bin/watchdog +++ b/usr/bin/watchdog @@ -9,14 +9,14 @@ sudo sed -i '/^interval/d' "$config_file" echo "interval = 60" | sudo tee -a "$config_file" > /dev/null if [ ${#ip_array[@]} -eq 0 ]; then sudo sed -i '/interval/d' "$config_file" - echo "No IP addresses found. Watchdog configuration cleared." >&2 + echo "No IP addresses found. Watchdog configuration cleared." >> /var/log/watchdog 2>&1 sudo systemctl stop watchdog else for ip in "${ip_array[@]}"; do echo "ping = $ip" | sudo tee -a "$config_file" > /dev/null done fi -sudo systemctl restart watchdog +sudo systemctl restart watchdog >> /var/log/watchdog 2>&1 -# Version 1.0: -# Created 2024 by Tim Eertmoed, Christian Hampp @ WiS IT-Solutions GmbH, Germany to work on Raspian as custom pxe init script. \ No newline at end of file +# Version 1.1: +# Created 2024 by Tim Eertmoed @ WiS IT-Solutions GmbH, Germany to work on Raspian as custom pxe init script. \ No newline at end of file