usr/bin/watchdog aktualisiert
This commit is contained in:
@@ -9,14 +9,14 @@ sudo sed -i '/^interval/d' "$config_file"
|
|||||||
echo "interval = 60" | sudo tee -a "$config_file" > /dev/null
|
echo "interval = 60" | sudo tee -a "$config_file" > /dev/null
|
||||||
if [ ${#ip_array[@]} -eq 0 ]; then
|
if [ ${#ip_array[@]} -eq 0 ]; then
|
||||||
sudo sed -i '/interval/d' "$config_file"
|
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
|
sudo systemctl stop watchdog
|
||||||
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
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
sudo systemctl restart watchdog
|
sudo systemctl restart watchdog >> /var/log/watchdog 2>&1
|
||||||
|
|
||||||
# Version 1.0:
|
# Version 1.1:
|
||||||
# Created 2024 by Tim Eertmoed, Christian Hampp @ 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.
|
||||||
Reference in New Issue
Block a user