#!/bin/bash


cron=$(sudo ps aux | grep crond | grep -v  grep  | grep -o crond| uniq)

if [ "$cron" = "crond" ]; then
        echo "OK: crond service is running fine on `hostname`"
        exit 0
else
        echo "CRITICAL: crond service not running on `hostname`"
        exit 2
fi


