bash test if process is running code example
Example: bash check if process is running by name
if pgrep -x "<PROCESS_NAME>" > /dev/null; then
echo "Running"
else
echo "Not running"
fi
if pgrep -x "<PROCESS_NAME>" > /dev/null; then
echo "Running"
else
echo "Not running"
fi