#!/bin/bash if [ $(pgrep -c $(basename $0)) -gt 1 ] then echo 'Proccess already exist. Exiting..' exit fi echo 'Good proccess run..' sleep 500;