I do not know the service\'s name, but would like to stop the service by checking its status.
For example, if I want to check if the PostgreSQL service is running or no
Based on this answer on a similar topic https://askubuntu.com/a/58406 I prefer: /etc/init.d/postgres status
/etc/init.d/postgres status