Fixed "service: not found" error from puppet-check.

This commit is contained in:
Timo Mkinen 2011-11-17 09:04:51 +02:00
parent 128f81ffc4
commit 0a47d1408b

View file

@ -62,7 +62,7 @@ end
err = sprintf("puppetd dead but pid file exists on host '%s', restarting\n",
Socket.gethostname)
Syslog.warning err
system("service puppet start > /dev/null")
system("service --help > /dev/null 2>&1 && service puppet start > /dev/null")
system(puppetd) if $?.exitstatus == 127
Syslog.close