From: Markus Strauss Date: Fri, 28 Oct 2011 19:43:05 +0000 (+0200) Subject: small delay before service restart so that runit can eventually create the supervise... X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=147fcede0e31e24c7734cbcf0b608c3f1f310924;p=puppet-runit.git small delay before service restart so that runit can eventually create the supervise dir. --- diff --git a/manifests/service/enabled.pp b/manifests/service/enabled.pp index 1a71f4d..d750914 100644 --- a/manifests/service/enabled.pp +++ b/manifests/service/enabled.pp @@ -21,7 +21,9 @@ define runit::service::enabled( $ensure = present ) { exec { "sv restart ${name}": subscribe => File["/etc/service/${name}"], - command => "/usr/bin/sv -w 60 restart /etc/sv/${name}", + # we wait a few seconds just in case this is the firstmost service activation + # then the supervise directory need to be created (automically) by runit + command => "/bin/sleep 3; /usr/bin/sv -w 60 restart /etc/sv/${name}", refreshonly => true, }