adapt to p5

Signed-off-by: Thomas Klaehn <tkl@blackfinn.de>
This commit is contained in:
2025-10-02 15:19:54 +02:00
parent 2ff69b7cea
commit a75a4a8579
3 changed files with 14 additions and 12 deletions

View File

@@ -16,18 +16,20 @@ if [ $? -eq 0 ]; then
fi
echo "no."
echo -n "Trying to wake up $host ... "
echo -n "Trying to wake up $host ($timeout) ... "
while [ $timeout -gt 0 ]; do
wol $host_mac >/dev/null 2>&1
# wol $host_mac >/dev/null 2>&1
wakeonlan $host_mac >/dev/null 2>&1
ping -c 1 $host >/dev/null 2>&1
if [ $? -eq 0 ]; then
echo "success."
exit 0
fi
((timeout--))
((timeout=timeout-1))
sleep 1
echo "no."
echo -n "Re-trying to wake up $host ... "
echo -n "Re-trying to wake up $host ($timeout) ... "
done
echo "no."