stable #2
@@ -28,9 +28,9 @@ update_watchdog_config() {
|
|||||||
# Set interval
|
# Set interval
|
||||||
echo "interval = 59" | sudo tee -a "$config_file" > /dev/null
|
echo "interval = 59" | sudo tee -a "$config_file" > /dev/null
|
||||||
|
|
||||||
|
|
||||||
if [ ${#ip_array[@]} -eq 0 ]; then
|
if [ ${#ip_array[@]} -eq 0 ]; then
|
||||||
echo "No IP addresses found. Watchdog configuration cleared." >> "$log_file"
|
echo "No IP addresses found. Watchdog configuration cleared." >> "$log_file"
|
||||||
return 0 # Indicate that no IP addresses were found
|
|
||||||
else
|
else
|
||||||
for ip in "${ip_array[@]}"; do
|
for ip in "${ip_array[@]}"; do
|
||||||
echo "ping = $ip" | sudo tee -a "$config_file" > /dev/null
|
echo "ping = $ip" | sudo tee -a "$config_file" > /dev/null
|
||||||
|
|||||||
Reference in New Issue
Block a user