usr/bin/custom/watchdog-monitor aktualisiert
This commit is contained in:
@@ -56,11 +56,12 @@ end_time=$((start_time + 300)) # 5 minutes in seconds
|
||||
interval=30 # Initial interval of 30 seconds
|
||||
|
||||
while true; do
|
||||
if ! update_watchdog_config; then
|
||||
echo "No IP addresses found. Waiting for $interval seconds before checking again..." >> "$log_file"
|
||||
else
|
||||
# Check if IP addresses are found and watchdog is updated
|
||||
if update_watchdog_config; then
|
||||
echo "IP addresses found and watchdog restarted. Exiting loop." >> "$log_file"
|
||||
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
|
||||
|
||||
current_time=$(date +%s)
|
||||
@@ -76,5 +77,5 @@ while true; do
|
||||
sleep $interval
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user