Service status on a script

Good day

What’s the command to use on a shell script to find if a specific Service is Running or not?

Thanks in advance

1 Like
if /etc/init.d/service_name running; then ...; else ...; fi

https://openwrt.org/docs/guide-user/base-system/managing_services#command-line_instructions

3 Likes

Thank you. It worked just fine.

1 Like

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