Cheking if a named process is running

#!/bin/bash
if [ "$(pidof process_name)" ]
then
     echo "process_name is running"
else
     echo "process_name is not running"
fi

References:

Comments

Popular posts from this blog