From eec0fdc63fb938c10ff3ca74a3d78215577acf06 Mon Sep 17 00:00:00 2001 From: mh Date: Sun, 26 Aug 2012 19:30:16 +0200 Subject: improve testing for service --- manifests/openbsd.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifests/openbsd.pp b/manifests/openbsd.pp index 1df5a9e..7ef6d28 100644 --- a/manifests/openbsd.pp +++ b/manifests/openbsd.pp @@ -8,9 +8,9 @@ class puppet::openbsd inherits puppet::base { restart => '/bin/kill -HUP `/bin/cat /var/run/puppet/agent.pid`', stop => '/bin/kill `/bin/cat /var/run/puppet/agent.pid`', start => '/usr/local/bin/puppet agent', - hasstatus => false, + status => '/bin/test -f /var/run/puppet/agent.pid && /bin/ps aux -p `/bin/cat /var/run/puppet/agent.pid` > /dev/null', + hasstatus => true, hasrestart => false, - pattern => 'puppet agent', } openbsd::rc_local { 'puppetd': -- cgit v1.2.3