Hi Everyone,
I'm trying to create a crontab in XVortex-Merlin (380.67) to wake up a server at a certain time. I have a script in /jffs/scripts called services-start to call the WOL file wol_nas.sh:
#!/bin/sh
#crontab for sending WOL packet to DADS_NAS at 10:55 pm every Sunday and 7:55pm
cru a Sunday_NAS_on "55 22 * * 0 /jffs/scripts/wol_nas.sh"
cru a Mon_NAS_on "55 19 1-7 * 1 /jffs/scripts/wol_nas.sh"
logger DADS_NAS is awake
The wol packet script wol_nas.sh is:
#!/bin/sh
sh /usr/sbin/ether-wake -b 192.168.1.255 00:19:d1:25:d3
Problem is when I run the wol_nas.sh script I get the error /usr/sbin/ether-wake: line 1: syntax error: unexpected word (expecting ")"). I also dont see the cron jobs (cru l). I have jffs scripts enabled in firmware and both scripts have been made executable. The syntax of the ether-wake statement appears correct to me (apparently it is not) and the broadcast and MAC addresses are correct. What am I doing wrong?
I'm trying to create a crontab in XVortex-Merlin (380.67) to wake up a server at a certain time. I have a script in /jffs/scripts called services-start to call the WOL file wol_nas.sh:
#!/bin/sh
#crontab for sending WOL packet to DADS_NAS at 10:55 pm every Sunday and 7:55pm
cru a Sunday_NAS_on "55 22 * * 0 /jffs/scripts/wol_nas.sh"
cru a Mon_NAS_on "55 19 1-7 * 1 /jffs/scripts/wol_nas.sh"
logger DADS_NAS is awake
The wol packet script wol_nas.sh is:
#!/bin/sh
sh /usr/sbin/ether-wake -b 192.168.1.255 00:19:d1:25:d3
Problem is when I run the wol_nas.sh script I get the error /usr/sbin/ether-wake: line 1: syntax error: unexpected word (expecting ")"). I also dont see the cron jobs (cru l). I have jffs scripts enabled in firmware and both scripts have been made executable. The syntax of the ether-wake statement appears correct to me (apparently it is not) and the broadcast and MAC addresses are correct. What am I doing wrong?