usr/bin/custom/watchdog-monitor aktualisiert

This commit is contained in:
2024-10-28 20:05:13 +01:00
parent 7b46dc4e73
commit a20d85f543

View File

@@ -56,11 +56,12 @@ end_time=$((start_time + 300)) # 5 minutes in seconds
interval=30 # Initial interval of 30 seconds interval=30 # Initial interval of 30 seconds
while true; do while true; do
if ! update_watchdog_config; then # Check if IP addresses are found and watchdog is updated
echo "No IP addresses found. Waiting for $interval seconds before checking again..." >> "$log_file" if update_watchdog_config; then
else
echo "IP addresses found and watchdog restarted. Exiting loop." >> "$log_file" echo "IP addresses found and watchdog restarted. Exiting loop." >> "$log_file"
break # Exit the loop if IP addresses were found break # Exit the loop if IP addresses were found
else
echo "No IP addresses found. Waiting for $interval seconds before checking again..." >> "$log_file"
fi fi
current_time=$(date +%s) current_time=$(date +%s)
@@ -76,5 +77,5 @@ while true; do
sleep $interval sleep $interval
done done
# Version 1.4: # Version 1.5:
# Created 2024 by Tim Eertmoed @ WiS IT-Solutions GmbH, Germany to work on Raspian as custom PXE init script. # Created 2024 by Tim Eertmoed @ WiS IT-Solutions GmbH, Germany to work on Raspian as custom PXE init script.