Fixed puppet-check cron job output

Using exec doesn't flush stdout properly, use system instead.
This commit is contained in:
Ossi Salmi 2011-02-25 01:05:31 +02:00 committed by Timo Mkinen
parent 749e5013b8
commit b4148531fe

View file

@ -41,8 +41,5 @@ end
# restart # restart
printf("puppetd dead but pid file exists on host '%s', restarting\n", printf("puppetd dead but pid file exists on host '%s', restarting\n",
Socket.gethostname) Socket.gethostname)
begin system("service puppet start")
exec("service puppet start") system(puppetd) if $?.exitstatus == 127
rescue Errno::ENOENT
exec(puppetd)
end