What's new

scMerlin scMerlin - service and script control menu for AsusWRT-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!

Jack Yaz

Part of the Furniture
v1.1.3
Updated 2020-08-29

Quick access to controlling services and scripts on your router

scMerlin is free to use under the GNU General Public License version 3 (GPL 3.0).

This project is hosted on GitHub

Love the script and want to support future development? Any and all donations gratefully received!
PayPal donation
Buy me a coffee

Example menu (options added/removed dynamically depending on which service(s) you have enabled on your router)
15b3000866.png


Supported firmware versions
You must be running firmware no older than:
Installation
Using your preferred SSH client/terminal, copy and paste the following command, then press Enter:
Code:
/usr/sbin/curl --retry 3 "https://raw.githubusercontent.com/jackyaz/scmerlin/master/scmerlin.sh" -o "/jffs/scripts/scmerlin" && chmod 0755 /jffs/scripts/scmerlin && /jffs/scripts/scmerlin install

Usage
To launch the scmerlin menu after installation, use:
Code:
scmerlin

If this does not work, you will need to use the full path:
Code:
/jffs/scripts/scmerlin
Updating
Launch scmerlin and select option u
 
Last edited:
Jack Yaz, just a big thank you for all these scripts recently!

I think I may have posted a suggestion like this somewhere on the forums, or, did I just think I did? :)

Either way, this is very useful to have for people that may not want to risk using certain commands themselves (or, not sure if the command is applicable for their router), just like me! :)

Looking forward to suggestions from others that may be possible to incorporate here.

I'll start!

The save NVRAM variables commands that dump all our settings into a text file would be a nice addition. What do you and others think?

Btw, I have been using this script for the last couple of days on my RT-AC86U and it works as advertised. Next, I'll try it on an RT-AC68U (384.11) and an RT-AC56U running john9527's LTS latest fork, 39E3.
 
Jack Yaz, just a big thank you for all these scripts recently!

I think I may have posted a suggestion like this somewhere on the forums, or, did I just think I did? :)

Either way, this is very useful to have for people that may not want to risk using certain commands themselves (or, not sure if the command is applicable for their router), just like me! :)

Looking forward to suggestions from others that may be possible to incorporate here.

I'll start!

The save NVRAM variables commands that dump all our settings into a text file would be a nice addition. What do you and others think?

Btw, I have been using this script for the last couple of days on my RT-AC86U and it works as advertised. Next, I'll try it on an RT-AC68U (384.11) and an RT-AC56U running john9527's LTS latest fork, 39E3.
Good point - I'll make SAMBA and FTP detect if they're enable in nvram

EDIT: Done - no version change
 
Last edited:
Jack Yaz, you may be too prolific! ;)

I think you either need to have your own amtm-like menu/overview script or amtm should be incorporating some of these soon? :)

I was at the PuTTY prompt a few minutes ago and I was typing YazFi, connmon, spdMerlin, ntpMerlin, and one more which shall remain unnamed for now, like a madman! Please, have a little mercy on our typing fingers, join forces with @thelonelycoder for possible inclusion in amtm asap. :D:D:D
 
Is this mainly to restart services/things that may be having issues and to stop Diversion in case you're navigating a site that requires ads to be enabled?

I think maybe another good option for the amtm menu?
 
Or a script kind of thing that enables amtm and your script to be run inside web gui, like a very smal and basic text terminal in a tab inside the asus-rmerlin web gui?
 
Or a script kind of thing that enables amtm and your script to be run inside web gui, like a very smal and basic text terminal in a tab inside the asus-rmerlin web gui?

I don't think we can have that (it was tried a long time ago, but abandoned because of security issues), but, we may get the next best thing.

I'll let Jack Yaz break that news though. Cool advances and even more user-friendly. Things are looking great on the scripting fronts. :)
 
I don't think we can have that (it was tried a long time ago, but abandoned because of security issues), but, we may get the next best thing.

I'll let Jack Yaz break that news though. Cool advances and even more user-friendly. Things are looking great on the scripting fronts. :)
Don't feel like logging into the GUI just use SCMerlin….
 
I don't think we can have that (it was tried a long time ago, but abandoned because of security issues), but, we may get the next best thing.

I'll let Jack Yaz break that news though. Cool advances and even more user-friendly. Things are looking great on the scripting fronts. :)
Not possible, as @L&LD says that used to exist in the firmware but was removed since it presented a significant security risk
 
Might be better to add "Restart" at the beginning of each service. I know there's an explanation above and a confirmation step after, yet so many people will jump on the menus to see if they can find more commands under the selections just before realizing they just restart the selected service.

<2cents.jpg>
 
Might be better to add "Restart" at the beginning of each service. I know there's an explanation above and a confirmation step after, yet so many people will jump on the menus to see if they can find more commands under the selections just before realizing they just restart the selected service.

<2cents.jpg>
That was my original design but i didn't like how it looked when i was striving for an alphabetical list. I've since tweaked that so I can revisit this
 
A little report of how scMerlin helped me out yesterday. With a really useful and not just a 'nice to have' addition to our chest of router tools.

I had about an hour where I was playing with the routers and was constantly jumping in and out of the GUI of my RT-AC86U and being SSH'd in with PuTTY on the same router. In the GUI, I was jumping between the Tools section and the added webpages of connmon, ntpMerlin, and an unnamed script/page when I saw the router GUI turn white and waiting for 5 minutes, using the back, refresh or any other buttons did not bring it back. I left it like this for about 15 minutes, closed the browser and logged out of PuTTY and tried to log back in later, but to no avail.

I finally thought I will try to use scMerlin to reboot the router, but when it connected normally via PuTTY, and amtm and all other scripts responded instantly, I tried connecting again via the browser/GUI. Still no go.

I then thought to use scMerlin to restart the Web Interface (httpd), option 3. and the browser instantly jumped to the login page. Success! :)

I'm sure we'll be hearing a lot more of these types of stories. How a clean, straightforward script saves rebooting the router (and further, even more, drastic actions) by selectively restarting parts of the essential services the routers (and we) depend on.

Thank you once again Jack Yaz!
 
I then thought to use scMerlin to restart the Web Interface (httpd), option 3. and the browser instantly jumped to the login page. Success! :)
That command is so helpful with some of niggles with the AC86U. Some time ago that was suggested for a webGUI lockup by RMerlin I think. It worked so well for me that I added it as a cron job in /jffs/scripts/services-start. :cool:
Code:
0 */6 * * * /sbin/service restart_httpd #restart_httpd#
I have not had webGUI logkups or the need for scheduled reboots or other panic S.M.A. efforts. I can see that as indeed being very useful for many.
 
Did you mean option 5?

No, just checked again. :)

Restart:
Option 3. Web Interface (httpd)

Edit: Btw! I don't see an option 5! I also force updated scMerlin, just to be sure. :)
 
That command is so helpful with some of niggles with the AC86U. Some time ago that was suggested for a webGUI lockup by RMerlin I think. It worked so well for me that I added it as a cron job in /jffs/scripts/services-start. :cool:
Code:
0 */6 * * * /sbin/service restart_httpd #restart_httpd#
I have not had webGUI logkups or the need for scheduled reboots or other panic S.M.A. efforts. I can see that as indeed being very useful for many.

The first time it happened for me, and it may have been self-inflicted too! But scMerlin was there when I needed it. :)
 
No, just checked again. :)

Restart:
Option 3. Web Interface (httpd)

Edit: Btw! I don't see an option 5! I also force updated scMerlin, just to be sure. :)


In the OP it shows scMerlin and it's options. It shows option 3. Internet Connection. Option 5. Web Interface (httpd)

???


c9422df564.png
 
In the OP it shows scMerlin and it's options. It shows option 3. Internet Connection. Option 5. Web Interface (httpd)

???


c9422df564.png

If that is the very first version (can't remember, I was doing some beta testing for Jack Yaz from the start), it has been updated a few times with no version changes. ;)
 

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