move wol script

This commit is contained in:
Lucas Faber authored and Lucas Faber committed 2026-10-01 14:07:25 +00:00
1 parent 58baa5f011
commit d1887382f2
1 file changed
+2 -1
+2 -1
View File
@@ -10,7 +10,8 @@ else
printf "Nonsense Input, hostname needed\n"
exit 0
fi
ifx=( $(/sbin/ip -br l | awk '$1 !~ "lo|vir|wl" { print $1}') )
mapfile -t ifx < <(ip -o link show | awk -F': ' '{print $2}')
echo ${ifx[@]}
for i in ${!ifx[@]}; do
sudo /usr/sbin/etherwake -b -i ${ifx[$i]} $mac
printf "%shost succsefully woken via ${ifx[$i]}: ${mac}\n" "$device"