• 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!

Scripts broken ?

GoNz0

Very Senior Member
So my 1st mistake was forgetting to backup JFFS after updating.

I have the following in JFFS\scripts to turn the led's off at night, all have been tried on 0777 and 7777 permissions but it doesn't work :(

i type cru l via telnet and get nothing back, any ideas ?

N66U running today's 3.0.0.4.374.39_0-em

ledsoff.sh
Code:
#!/bin/sh
nvram set led_disable=1
service restart_leds
ledson.sh
Code:
#!/bin/sh
nvram set led_disable=0
service restart_leds
services-start.sh
Code:
#!/bin/sh
cru a lightsoff "0 22 * * * /jffs/scripts/ledsoff.sh"
cru a lightson "0 7 * * * /jffs/scripts/ledson.sh"
 
So my 1st mistake was forgetting to backup JFFS after updating.

I have the following in JFFS\scripts to turn the led's off at night, all have been tried on 0777 and 7777 permissions but it doesn't work :(

i type cru l via telnet and get nothing back, any ideas ?

N66U running today's 3.0.0.4.374.39_0-em

ledsoff.sh
Code:
#!/bin/sh
nvram set led_disable=1
service restart_leds
ledson.sh
Code:
#!/bin/sh
nvram set led_disable=0
service restart_leds
services-start.sh
Code:
#!/bin/sh
cru a lightsoff "0 22 * * * /jffs/scripts/ledsoff.sh"
cru a lightson "0 7 * * * /jffs/scripts/ledson.sh"

Try reading RMerlin's excellent documentation

https://github.com/RMerl/asuswrt-merlin/wiki/Scheduled-LED-control

https://github.com/RMerl/asuswrt-merlin/wiki/User-scripts

Basically you have the wrong name for one of the scripts, and are missing a statement in the other two scripts....

Regards,
 
yeh i had tried service-start without the .sh and it didn't work, so I created it on the router and job done :)

I do not think I have a missing statement unless you mean the nvram commit ?

I did read, reread and didn't know if I needed them or not ?

If I do could you correct my opening post code sections so I know I have done it right if you don't mind?
 
this?

ledsoff.sh
Code:
#!/bin/sh
nvram set led_disable=1
nvram commit
service restart_leds
ledson.sh
Code:
#!/bin/sh
nvram set led_disable=0
nvram commit
service restart_leds
services-start
Code:
#!/bin/sh
cru a lightsoff "0 22 * * * /jffs/scripts/ledsoff.sh"
cru a lightson "0 7 * * * /jffs/scripts/ledson.sh"
[/QUOTE]
 

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!
Top