Skip to content
Snippets Groups Projects
Verified Commit e2d75ebf authored by David Beniamine's avatar David Beniamine
Browse files

Fix wakeonlan service

parent a5bb2a74
Branches
No related tags found
No related merge requests found
......@@ -18,12 +18,12 @@
IP=$(ip a | awk '/inet.*containers/ {print $2}' | cut -d / -f 1)
broadcast=$(ip a | awk '/inet.*eth1/ {print $4}' | cut -d / -f 1)
netcat -l $IP 9999 | \
netcat -k -l $IP 9999 | \
while read MAC
do
if [ $(echo "$MAC" | egrep -c "^([0-9a-f]{2}:?){6}$") -eq 1 ]
then
wakeonlan -i $broadcast "$line"
wakeonlan -i $broadcast "$MAC"
fi
done
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment