add bins and alternatives
This commit is contained in:
parent
a935bb9893
commit
9f3594e0d3
21 changed files with 210 additions and 10 deletions
22
data/home/.local/bin/enable_wol.sh
Executable file
22
data/home/.local/bin/enable_wol.sh
Executable 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
|
Loading…
Add table
Add a link
Reference in a new issue