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

City Code Table for Casio SGW300HD-1AV Watch

How to force only 4G or LTE network connection for Samsung Galaxy Note 4

Mounting NFS share directory from D-link DNS 320L on Ubuntu 12.04 LTS