What's new

Scheduled led

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

pepeEL

Banned
Hello
I have latest version firmware 378.55 and i want do scheduled led. I do all step by step in this link:
https://github.com/RMerl/asuswrt-merlin/wiki/Scheduled-LED-control

but for me not working. WHen i do

cru l

i have nothing. I copy file and add permisssion 0755 in the directory /jffs/scripts/

All file(services-start, leddoff.sh, ledson.sh) is set in /jffs/scripts/
Please help me.
 
please help me...

Good option is add to GUI scheduler plan... to led on/off.
 
please help me...

Good option is add to GUI scheduler plan... to led on/off.

You will need to provide details of your command line testing...

My script looks like this ledsoff.sh

Code:
#!/bin/sh

logger -s -t "($(basename $0))" $$ LEDs now switched OFF!

nvram set led_disable=1
nvram commit
service restart_leds


and I tested like this:

Code:
admin@RT-AC56U:/jffs/scripts# ls -l leds*
-rwxr-xr-x    1 admin    root           167 Feb  1 14:57 ledsoff.sh
-rwxr-xr-x    1 admin    root           164 Feb  1 14:57 ledson.sh

admin@RT-AC56U:/jffs/scripts# sed -i 's/\r//g' ledsoff.sh


admin@RT-AC56U:/jffs/scripts# ./ledsoff.sh
(ledsoff.sh): 21801 LEDs now switched OFF!

Done.
admin@RT-AC56U:/jffs/scripts#
 
When i manual run script ledson.sh and ledsoff.sh it work ok. But not start by cron.

Wysłane z mojego SM-G850F przy użyciu Tapatalka
 
When i manual run script ledson.sh and ledsoff.sh it work ok. But not start by cron.

Wysłane z mojego SM-G850F przy użyciu Tapatalka

OK, so why not give us a clue as to what happens when you type in the command?

Code:
cru a

to show the syntax you use to add the cron task.

I'm sure the problem is PEBKAC!
 
when i type cru a i have:

Code:
admin@RT-AC87U:/tmp/home/root# cru a

Cron Utility
add:    cru a <unique id> <"min hour day month week command">
delete: cru d <unique id>
list:   cru l

admin@RT-AC87U:/tmp/home/root#


but i have in /jffs/scripts/
file named services-start and in this file i have:

Code:
#!/bin/sh
cru a ledsoff "0 23 * * * /jffs/scripts/ledsoff.sh"
cru a ledson "0 7 * * * /jffs/scripts/ledson.sh"

But when i restart router and then start again and type : Cru l i have nothing:
Code:
admin@RT-AC87U:/tmp/home/root# cru l
admin@RT-AC87U:/tmp/home/root#
 
Two things to check...
make sure Enable JFFS custom scripts is on in the router gui
make sure your scripts are in the proper format (Linux and not DOS/Windows). How did you create the scripts?
 
In version 378.55 not have in GUI option to jffs... but in tools>sysinfo show me size jffs:

Internal Storage
NVRAM usage
45339 / 65536 bytes
JFFS 2.03 / 62.75 MB


I have create scripts in notepadd++ and it works me on old version. Two days ago i update my router to version 378.55 and reset router to default and configure from begin... and put in jffs the same script which works me on back version firmware.
 
In version 378.55 not have in GUI option to jffs
Good that you updated your signature :) We really do use that to provide help.

Do you see the syslog entry that services-start was executed?
 
i see in syslog and i found:

Code:
Jan  1 01:00:25 custom script: Found services-start, but custom script execution is disabled!

But in gui i dont have option to Enable custom scripts. Why ?
 
In version 378.55 not have in GUI option to jffs...

In version 378.55, the option "Enable jffs custom scripts and configs" should be enabled by default if not mistaken, but if you don't even have the option then something is really wrong! I presume you checked under Administration/System...
 
Did you do a factory reset after loading 378.55? Merlin changed the variables when he removed the option and the new option needs to be setup.

You can try and enable it with the following:

nvram unset jffs2_on
nvram set jffs2_enable=1
nvram commit

then on reboot it should run.
 
Yes yes this option is in Administration>System
After factory reset i have set Disabled. Now i Enable it and check :)

EDIT
Now is started:
Code:
Jan  1 01:00:25 custom script: Running /jffs/scripts/services-start

and

Code:
admin@RT-AC87U:/tmp/home/root# cru l
0 23 * * * /jffs/scripts/ledsoff.sh #ledsoff#
0 7 * * * /jffs/scripts/ledson.sh #ledson#
admin@RT-AC87U:/tmp/home/root#

Thanks for help :)
 
Last edited:
Good that you updated your signature :) We really do use that to provide help.

I really, really do not like when signatures are used for important stuff like hardware and firmware versions. Why?

Because when others come to read in a few weeks, months or years - the sig at that time rarely matches the question and answers that followed.

I recommend to explicitly state in the post the relevant data. And if needed, each time too.
 
I really, really do not like when signatures are used for important stuff like hardware and firmware versions. Why?

Because when others come to read in a few weeks, months or years - the sig at that time rarely matches the question and answers that followed.

I recommend to explicitly state in the post the relevant data. And if needed, each time too.
Good point!
 
In version 378.55, the option "Enable jffs custom scripts and configs" should be enabled by default if not mistaken, but if you don't even have the option then something is really wrong! I presume you checked under Administration/System...

It's not. That's the reason for this setting to exist: so if you have a custom script preventing your router from even booting, a factory default reset would disable that script, giving you back access to your router.
 
It's not. That's the reason for this setting to exist: so if you have a custom script preventing your router from even booting, a factory default reset would disable that script, giving you back access to your router.
Right RMerlin, makes total sense!
 

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