How can I issue the "service" command in script?

MOX OS
Trying to issue the “service” command in script (because I wanted to mute red LED heartbeating [*]) I encountered error
service: not found
or
can’t open ‘service’: No such file or directory
for various attempts to call the service… Anyhow, direct call in CLI was successful.
BTW, trying to find the “service” command, nothing was found. But the command itself is of course working (via CLI).
Any advice/help will be welcomed and appreciated.
[*] following [OpenWrt Wiki] LED configuration /etc/config/system and experimenting with LuCI LED settings

I see service led restart in the wiki. AFAIK normal service control on Turris (and OpenWrt in general I thought) is like /etc/init.d/led restart

1 Like

You made my day! That’s it! It’s working! Thanks a lot, it didn’t come to my mind that “service led” could be translated to “/etc/init.d/led” :frowning:

Next time I’ll have to search OpenWrt documentation more thoroughly. There is document Managing Services where it is described how to manage services using command-line interface. My bad.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.