add bins and alternatives

This commit is contained in:
JOLIMAITRE Matthieu 2024-06-18 03:52:40 +02:00
parent a935bb9893
commit 9f3594e0d3
21 changed files with 210 additions and 10 deletions

View file

@ -0,0 +1,22 @@
#!/bin/sh
echo "done" > "/tmp/done.txt"
set -e
sleep 15s
function enable_wol_for() {
echo "[enable_wol] enabling wol on '$1'"
sudo ethtool -s $1 wol g
echo "[enable_wol] success"
sudo ethtool $1 | grep Wake-on
}
for _ in $(seq 10)
do
ip link | grep enp | while read line; do
name=$(echo "$line" | cut -d ":" -f 2)
enable_wol_for "$name"
done
sleep 10s
done