my WakeOnLan only works, after pulling the power cord. I would like to wake my NAS, when pressing the NAS button on the remote. But I'm not familiar with linux at all.
Can somebody help me to make the code working? The wakelan.conf is correct, because after manual restarting the module my NAS wakes up. But to click through the entire ASUS menu is quite annoying.
What I have so far:
In irfake.conf
- Code: Select all
"1","b24d686c","/usr/local/etc/mos/irfake/wake_DS212.sh &", WOL DS212
In my wake_DS212.sh
- Code: Select all
#!/bin/sh
#
# description: Wake DS212
#
mos=/usr/local/etc/mos
# waiting valid IP address
$mos/bin/wait_ip && exit 1
echo "Send UDP packets..."
# read config
[ -f $mos/etc/wakelan.conf ] && eval "$( cat $mos/etc/wakelan.conf | sed '/^$/d' )"
mac=${mac:-"00:11:22:33:44:55"}
bcast=${bcast:-''}
port=${port:-''}
# running wakelan
[ ! -z $mac ] && m="-m $mac"
[ ! -z $bcast ] && b="-b $bcast"
[ ! -z $port ] && p="-p $port"
$mos/bin/wakelan $m $b $p
;;
exit $?
I copied the code form the S38wakelan. So far nothing happens. For a linux expert the easiest would be, just to restart the module/service/deamon, but I have no idea to do this.
Help is appreciated.