#!/bin/bash


cenver=`cat /etc/redhat-release | awk {'print $3'} | cut -d. -f1` ;

if [ $cenver -eq 3 ]; then
        echo "OK: OS Centos 3 detected. No puppet support"
        exit 0
fi


if [ "$(/bin/systemctl status puppet | grep -o "active (running)")" ]; then
        echo "OK. Puppet client is running fine"
        exit 0
else
        echo "WARNING. Puppet client is not running fine"
        exit 1
fi
