diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2011-02-23 10:58:30 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2011-02-23 10:58:30 -0300 |
commit | 3f1a3d0efb58a4395add825195a76e2b2e8ef8a8 (patch) | |
tree | 47b1e730309ff9f03f92bd3e1659ede4851a0d24 /templates/check-puppetd.sh.erb | |
parent | afb66d541c0fcaf136cbc64aa11efa3b3aeb3155 (diff) | |
download | puppet-puppet-3f1a3d0efb58a4395add825195a76e2b2e8ef8a8.tar.gz puppet-puppet-3f1a3d0efb58a4395add825195a76e2b2e8ef8a8.tar.bz2 |
Enhancing puppet-check
Diffstat (limited to 'templates/check-puppetd.sh.erb')
-rw-r--r-- | templates/check-puppetd.sh.erb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/templates/check-puppetd.sh.erb b/templates/check-puppetd.sh.erb index 639a1d5..80ea3f6 100644 --- a/templates/check-puppetd.sh.erb +++ b/templates/check-puppetd.sh.erb @@ -3,6 +3,7 @@ # check if puppet is running # +PATH="$PATH:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" PID="/var/run/puppet/<%= puppet_agent_name %>.pid" INIT="/etc/init.d/puppet" @@ -11,7 +12,9 @@ function puppet_start { $INIT start } -if [ ! -f "$PID" ]; then +if [ "$1" == "restart" ]; then + puppet_restart +elif [ ! -f "$PID" ]; then puppet_start else running="$(ps $(cat $PID) &> /dev/null)" |