What's new

Simple script not launching on boot

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

SwizItalo

Occasional Visitor
  • So i made a script at "/jffs/scripts" (the folder scripts wasnt there, so i made it)
  • Enabled JFFS custom scripts and configs on webui
  • chmod 777 file services-start
  • The script runs ok when i manually execute it "/jffs/scripts# sh services-start" but it won't launch on start up
This is content:

Code:
#!/bin/sh
sleep 20
# Wifi On
nvram set wl0_radio=1
nvram set wl1_radio=1
service restart_wireless
# Linksys logo
/jffs/bin/gpio 6 0

When i run it manually it says :
'leep: invalid number '20
But the script runs fine, except the sleep command is wrong? and dont have time to execute the next commands in the moment of startup?

By the way, i don't understand why the error says 'leep and no sleep
 
Last edited:
  • So i made a script at "/jffs/scripts" (the folder scripts wasnt there, so i made it)
  • Enabled JFFS custom scripts and configs on webui
  • chmod 777 file services-start
  • The script runs ok when i manually execute it "/jffs/scripts# sh services-start" but it won't launch on start up
This is content:

Code:
#!/bin/sh
sleep 20
# Wifi On
nvram set wl0_radio=1
nvram set wl1_radio=1
service restart_wireless
# Linksys logo
/jffs/bin/gpio 6 0

When i run it manually it says :

But the script runs fine, except the sleep command is wrong? and dont have time to execute the next commands in the moment of startup?

By the way, i don't understand why the error says 'leep and no sleep

Are you still using illegal firmware on a Linksys ea6900? If so, that might be your problem.

So i made a script at "/jffs/scripts" (the folder scripts wasnt there, so i made it)
That folder is always there with genuine Merlin firmware. Another indication that there's something amiss with the firmware that you're using.
 
Last edited:
(the folder scripts wasnt there, so i made it)
If the folder isn't there, then you aren't running Asuswrt-Merlin, or are on a version that is many years old and probably doesn't support user scripts.
 
I found a solution:

I remove the services-start i created and start over.
First install scMerlin and edit services-start already generated by the addon.
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

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