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
If you run the following command you will get a list of services:
sudo service --status-all
To get a list of upstart jobs run this command:
sudo initctl list