I have created the following bash script to find out if process is running or not
ps -ef | grep process_name 
if [ $? -eq 0 ]; then
  echo "Process is running."
else
  echo "Process is not running."
fi
However, the script is always returning "Process is running."
Please suggest the correct way to find out if the process is running or not.