From d1887382f2e9b43b684856ad6b3cff4d552ce79b Mon Sep 17 00:00:00 2001 From: Lucas Faber Date: Wed, 30 Sep 2026 17:21:05 +0200 Subject: [PATCH] move wol script --- wol.sh => network/wol.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) rename wol.sh => network/wol.sh (88%) diff --git a/wol.sh b/network/wol.sh similarity index 88% rename from wol.sh rename to network/wol.sh index bd7072d..731755f 100755 --- a/wol.sh +++ b/network/wol.sh @@ -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"