The ‘if’ statement below checks to see if the process is running with the help of the ‘ps’ command. In the if statement, "ps aux" lists the current running processes. The next section finds out the your process, then we eliminate the grep process from the obtained list of your processes and finally, count the number of instances. If that result is greater than zero, your process is running, else it isn't.