What's new

AC66U B1 switching from Freshtomato to Merlin

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

cru a RestartWan "45 09 * * * service restart_wan 0"
IIRC you need to quote the restart_wan parameter....so if it doesn't work as is, try

cru a RestartWan "45 09 * * * service \"restart_wan 0\""
 
Thank you, i have set the correct chmod permissions :
Code:
ced@RT-AC66U_B1-F600:/jffs/scripts# ls -l init-start
-rwxr-xr-x    1 ced      root            63 Jan 12 18:03 init-start

IIRC you need to quote the restart_wan parameter....so if it doesn't work as is, try

cru a RestartWan "45 09 * * * service \"restart_wan 0\""

About the correct syntax, I will try it directly in ssh/telnet to see if it trigger a reconnection :
Code:
service restart_wan 0
 
Hello,
The correct syntax was :
Code:
service restart_wan

service restart_wan 0 returned me an error (sort of) :
Code:
ced@RT-AC66U_B1-F600:/tmp/home/root# service restart_wan 0
Usage: service <action_service>

ced@RT-AC66U_B1-F600:/tmp/home/root# service restart_wan

Done.

If I haven't done a mistake with the script, it will do the work...
Thanks to everybody for all your help ;)
 
Last edited:
service restart_wan 0 returned me an error (sort of) :
That's because as noted above you need to use quotes if the service command has more than one parameter. But as I mentioned restart_wan doesn't have any parameters because it restarts all WAN interfaces, whereas restart_wan_if does need the interface number as a parameter.

So the commands are:
service restart_wan
or
service "restart_wan_if 0"
 
Hello,
Sadly this script don't work, the command "service restart_wan" without quotes is working, I have tested it, but I probably have a syntax problem with the script :
Code:
#!/bin/sh
cru a RestartWan "45 09 * * * service restart_wan"

Or may be there is something to enable on the router web interface to allow script execution ?

Edit : Arf, in http://192.168.1.1/Advanced_System_Content.asp there is an option to enable the use of scripts : "Enable JFFS custom scripts and configs"
I enabled it to see if it change something :)
 
If you mean reboot it after I enabled the script option in Web interface, no, I will reboot it...
Thank you ;)
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!

Staff online

Top