I am trying to build a nice service bash script for a custom service I built, my problem is that I need to identify if the process is running armed with the path to the file only.
From all my googling I have found the answer on how to find the path of a PID but I need the exact opposite.
Let's say my executable is located in /home/monitor/script.py
It is executed like this: python /home/monitor/script.py
Armed with this how would I be able to find the process ID if it is running?