What's new

Pre-loaded scripts?

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

helloguys

Occasional Visitor
Sorry for newbie questions. I was reading https://github.com/RMerl/asuswrt-merlin.ng/wiki/User-scripts, but couldn't find the mentioned scripts (such as "wan-event", "wan-start", etc.) in the /jffs/scripts folder. Should those scripts exist when I "Enable JFFS custom scripts and configs"? If not, where I can find those scripts so that I can upload to the router? Thank you!

RT-AC86U, Merlin 386.1_2.

Scripts.png


Files.png
 
so I just ran amtm from SSH to bring up the front end. Which one of the following contains "wan-event" and "wan-start" scripts?
None of them. amtm is something separate. The user scripts, like wan-start do not exist by default. You have to create them yourself.
 
The Wiki (https://github.com/RMerl/asuswrt-merlin.ng/wiki/User-scripts) seems to indicate those scripts were prebuilt and integrated into the Merlin firmware. "deprecated since 384.15, please use wan-event instead". Does that mean wan-event script is available by default after 384.15? Where I can find it? Thanks!

wan-start.png


The wan-event script description below explains the parameters to be passed to the script, which indicates it has been built by someone else. The question is - where to find it?
wan-event.png

None of them. amtm is something separate. The user scripts, like wan-start do not exist by default. You have to create them yourself.
 
Last edited:
Thank you Colin. Any chance you know where to find those scripts? The Wiki gives use instructions, which makes me believe the scripts have been built (by someone else). Thank you very much!

No, it is saying that "support" for those user-written scripts is built into the firmware. It is not saying that the firmware includes any of those scripts.
 
The scripts themselves are just regular shell scripts and can contain anything you like. Various scripts have been posted by users in the forum. You could use those as a guide for your own script.

The router is fully functional without any user scripts. They are entirely optional.
 
I understand. I was trying to reinvent the wheels if the scripts are already out there. So even those popular scripts are mentioned in the wiki with use instructions, there's no easy way to download them? We have to rebuild them from scratch even if there were out there? Thanks!

The scripts themselves are just regular shell scripts and can contain anything you like. Various scripts have been posted by users in the forum. You could use those as a guide for your own script.

The router is fully functional without any user scripts. They are entirely optional.
 
Those 'scripts' are just hooks into the router.

Search the forum using 'Better search' at the top of the page to find how people use those scripts for their needs.
 
So even those popular scripts are mentioned in the wiki with use instructions, there's no easy way to download them? We have to rebuild them from scratch even if there were out there?
As @L&LD said they are not "popular" scripts in themselves, they are just predefined user hooks that are invoked (if the script exists) when a specific event occurs. If you look again at amtm or at the posts in the Asuswrt-Merlin AddOns sub-forum you will see lots of popular scripts which in turn often use one or more of these hooks.

Add-on scripts like Diversion are very sophisticated and create or modify many of router's user scripts when they are installed. But if a user has a simple need that one of the Merlin-AddOns doesn't already cover they can write their own or copy one from a forum post. For example, here is a wan-event script that I wrote for a user that had a very specific need.
 

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