#!/bin/bash # # check if puppet is running # PID="/var/run/puppet/puppetd.pid" INIT="/etc/init.d/puppet" if [ ! -f "$PID" ]; then $INIT start else running="$(ps $(cat $PID) &> /dev/null)" if [ "$?" != "0" ]; then $INIT start fi fi