What's new

The "service" command and how does it work?

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

Ronv42

Senior Member
I never really thought about using the "service" command in the past since I used to just replace configuration files in Tomato and Merlin. But now I am using the modification scripts and I need to use the command more often to bring in my customizations.

Just being curious where does the "service" command look for it's service definitions? I am used to using inet.d and other startup components but I would like to know how this operates and generally is configured and works.

Thanks...
 
I never really thought about using the "service" command in the past since I used to just replace configuration files in Tomato and Merlin. But now I am using the modification scripts and I need to use the command more often to bring in my customizations.

Just being curious where does the "service" command look for it's service definitions? I am used to using inet.d and other startup components but I would like to know how this operates and generally is configured and works.

Thanks...

It's not going through a service definition list. It's directly signalling the main rc process.

There is no documented list because these are internal functions, therefore they can change between versions. The only way to get an up-to-date list is to dive through the source code.

https://github.com/RMerl/asuswrt-merlin/blob/master/release/src/router/rc/services.c#L4034
 
These are the ones I found:
restart_cstats
restart_dnsmasq
restart_dnsmasq_ipv6
restart_dualwan
restart_fanctrl
restart_fbwifi
restart_fbwifi_register
restart_iptrestore
restart_mdns
restart_nas_services
restart_rstats
restart_upnp
restart_wan_line
restart_wireless
 
You responded to a 7-year-old thread!
 

Similar 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