What's new

scMerlin scMerlin 2.5.47 - Service and script control menu for Asuswrt-Merlin

Not sure what prompted your post, but if this is directed at me, due to the query I posted above then thank you for the warning, I admit to having had a few dim moments over the years, both locally and over a VPN, but ultimately nothing that cannot ultimately be solved by a hard reset; albeit clearly for remote systems I prefer that not to be the outcome in every case.

You would hopefully see from past posts that I am reasonably aware of at least some of the services I restart on a regular basis, service restart_wireless being one of them (service restart_mdns, service restart_leds, service restart_dnsmasq, service restart_httpd being among others).

I felt however that in this instance (and taking on your board your note of caution here) there was some clarity required where the Service Name stated e.g. "Wifi" with a nice Big Restart Button, that the service was indeed the same service restart_wireless command I have issued via SSH on more occasions than I can recall :-).

But again, you are correct to point these out, so the concern is appreciated.
What prompted the post was that there are often in replies the odd command string with no explanation of what is does.
People will often remember something but not remember the why of it.

I simply wanted to expand peoples knowledge without tempting 'dangerous' playing about with commands !!!

Knowledge is power ... as long as you know the downsides as well !!! :)

Not aimed at anyone just wanted to fill in the blanks for someone.

I like to know and I am sure others do BUT often one does not know where to start.

:D
 
'service' follows a pattern as follows:

service <action>_<servicename>

Don't miss the underscore in the middle (no spaces either side)
A side note complementing what @Twiglets explained in his earlier post.
The service script can actually take arguments along with the action to be executed. I figured this out some time ago as I needed it so bad in early days while "playing" around with the service script.
An example:
Code:
service "restart_wan_if 0"
service "restart_wan_if 1"

Not aimed at anyone just wanted to fill in the blanks for someone.
Again for @jksmurf, I too am putting this out to help whoever needs it in the future.
 
<grin> spot on ... thanks for the update/clarification.

This is another of those 'Rabbit Hole' situations where you can get lower & lower in detail !!!
I tried to keep it simple ... not everyone has a background in 'playing' with shells/scripting.

Not a criticism as I needed to stop myself from going too far and confusing the intended audience or myself :confused:;)
As I have mentioned before I 'like' reading MAN pages & github and similar repositories to understand things, when my brain still works.
o_O
 
I am having an issue with scMerlin which I am not sure if this is something new or from an older version. Seeking clarification.
In the messages logfile I am seeing numeroous wan-events for Stopped, Connected, and Disconnected. This behaviour is repeated approx every 10 minutes as shown in an excerpt below: cat /opt/var/log/messages

Code:
Jan 13 10:06:54 RT-BE88U custom_script: Running /jffs/scripts/wan-event (args: 0 disconnected)
Jan 13 10:06:54 RT-BE88U custom_script: Running /jffs/scripts/wan-event (args: 0 stopped)
Jan 13 10:06:54 RT-BE88U custom_script: Running /jffs/scripts/wan-event (args: 0 connected)
Jan 13 10:16:51 RT-BE88U custom_script: Running /jffs/scripts/wan-event (args: 0 disconnected)
Jan 13 10:16:51 RT-BE88U custom_script: Running /jffs/scripts/wan-event (args: 0 stopped)
Jan 13 10:16:51 RT-BE88U custom_script: Running /jffs/scripts/wan-event (args: 0 connected)
Jan 13 10:26:47 RT-BE88U custom_script: Running /jffs/scripts/wan-event (args: 0 disconnected)
Jan 13 10:26:47 RT-BE88U custom_script: Running /jffs/scripts/wan-event (args: 0 stopped)
Jan 13 10:26:47 RT-BE88U custom_script: Running /jffs/scripts/wan-event (args: 0 connected)
Jan 13 10:36:44 RT-BE88U custom_script: Running /jffs/scripts/wan-event (args: 0 disconnected)
Jan 13 10:36:44 RT-BE88U custom_script: Running /jffs/scripts/wan-event (args: 0 stopped)
Jan 13 10:36:44 RT-BE88U custom_script: Running /jffs/scripts/wan-event (args: 0 connected)
Jan 13 10:46:41 RT-BE88U custom_script: Running /jffs/scripts/wan-event (args: 0 disconnected)
Jan 13 10:46:41 RT-BE88U custom_script: Running /jffs/scripts/wan-event (args: 0 stopped)
Jan 13 10:46:41 RT-BE88U custom_script: Running /jffs/scripts/wan-event (args: 0 connected)
Jan 13 10:56:37 RT-BE88U custom_script: Running /jffs/scripts/wan-event (args: 0 disconnected)
Jan 13 10:56:37 RT-BE88U custom_script: Running /jffs/scripts/wan-event (args: 0 stopped)
Jan 13 10:56:37 RT-BE88U custom_script: Running /jffs/scripts/wan-event (args: 0 connected)
Jan 13 11:06:34 RT-BE88U custom_script: Running /jffs/scripts/wan-event (args: 0 disconnected)
Jan 13 11:06:34 RT-BE88U custom_script: Running /jffs/scripts/wan-event (args: 0 stopped)
Jan 13 11:06:34 RT-BE88U custom_script: Running /jffs/scripts/wan-event (args: 0 connected)
Jan 13 11:16:30 RT-BE88U custom_script: Running /jffs/scripts/wan-event (args: 0 disconnected)
Jan 13 11:16:30 RT-BE88U custom_script: Running /jffs/scripts/wan-event (args: 0 stopped)
Jan 13 11:16:30 RT-BE88U custom_script: Running /jffs/scripts/wan-event (args: 0 connected)
Jan 13 11:26:26 RT-BE88U custom_script: Running /jffs/scripts/wan-event (args: 0 disconnected)
Jan 13 11:26:26 RT-BE88U custom_script: Running /jffs/scripts/wan-event (args: 0 stopped)
Jan 13 11:26:26 RT-BE88U custom_script: Running /jffs/scripts/wan-event (args: 0 connected)
Jan 13 11:36:22 RT-BE88U custom_script: Running /jffs/scripts/wan-event (args: 0 disconnected)
Jan 13 11:36:22 RT-BE88U custom_script: Running /jffs/scripts/wan-event (args: 0 stopped)
Jan 13 11:36:22 RT-BE88U custom_script: Running /jffs/scripts/wan-event (args: 0 connected)
Jan 13 11:46:19 RT-BE88U custom_script: Running /jffs/scripts/wan-event (args: 0 disconnected)
Jan 13 11:46:19 RT-BE88U custom_script: Running /jffs/scripts/wan-event (args: 0 stopped)
Jan 13 11:46:19 RT-BE88U custom_script: Running /jffs/scripts/wan-event (args: 0 connected)
Jan 13 11:56:16 RT-BE88U custom_script: Running /jffs/scripts/wan-event (args: 0 disconnected)
Jan 13 11:56:16 RT-BE88U custom_script: Running /jffs/scripts/wan-event (args: 0 stopped)
Jan 13 11:56:16 RT-BE88U custom_script: Running /jffs/scripts/wan-event (args: 0 connected)

When I look at /jffs/scripts/wan-event the only entry is for scMerlin: cat /jffs/scripts/wan-event

Code:
#!/bin/sh
/jffs/scripts/scmerlin wan_event "$@" & #Added by scMerlin#

It appears this is also causing dnsmasq to be restarted approx every 10 minutes.

My question:
Is the wan-event entry for scMerlin still a required file, or is this something leftover from an older installation of scMerlin that should be removed from the wan-event script?

Thanks in Advance...
 
My question:
Is the wan-event entry for scMerlin still a required file, or is this something leftover from an older installation of scMerlin that should be removed from the wan-event script?

Thanks in Advance...

It's still required. That's one of the methods scMerlin uses to tracks your wan uptime which can be seen both in the WebUI and in the Shell script.
 
OK, thanks but it only displays my wan uptime somewhere around 10 minutes or less because it keeps disconnecting and reconnecting, which as I stated is causing dnsmasq to be recycled also. Seems like an awful lot of disconnect, reconnects.
 
OK, thanks but it only displays my wan uptime somewhere around 10 minutes or less because it keeps disconnecting and reconnecting, which as I stated is causing dnsmasq to be recycled also. Seems like an awful lot of disconnect, reconnects.

Agreed. It does seem like lots of disconnects and reconnects, I would have to urge you to identify why you keep getting WAN reconnections.

The wan-events file content only calls scMerlin to update the uptime timer when the router disconnects and reconnects as you've seen in your logs.

ScMerlin is not the one calling wan-events, ScMerlin is being called by the wan-events. Wan-events file is triggered everytime the router has a wan state change.
 
Ah! That makes more sense, I'll look deeper. Thanks...
 
Ah! That makes more sense, I'll look deeper. Thanks...

No worries.

Just wanted to point you in the right direction, it's possible something on the router is causing your wan state to change and if so you should absolutely dig into it.

It could also literally be your ISP upstream having issues. It's hard to tell just by those logs.

But that wan-events file in short is just called by the router to trigger "something" (in this case Scmerlin) when the state of the wan connection changes.
 

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