usr/local/bin/custom/poe.sh aktualisiert

This commit is contained in:
2025-10-12 19:29:39 +02:00
parent c7266f73f3
commit 7561791a0b

View File

@@ -90,7 +90,7 @@ echo "" > "$LOGFILE"
while true; do
echo "--------------------------------------------------------------------" >> "$LOGFILE"
python3 /srv/poe_manager/generate_ips.py | while IFS=: read -r rpi_ip dev_name switch_ip switch_hostname switch_port switch_user switch_pass; do
if ping -c 1 -W 2 "$rpi_ip" &> /dev/null; then
if ping -c 2 -W 1 "$rpi_ip" &> /dev/null; then
echo "$(date '+%Y-%m-%d %H:%M:%S') $dev_name ist erreichbar!" >> "$LOGFILE"
else
echo "$(date '+%Y-%m-%d %H:%M:%S') $dev_name ist nicht erreichbar!" >> "$LOGFILE"