]> gitweb.fluxo.info Git - puppet-runit.git/commitdiff
small delay before service restart so that runit can eventually create the supervise...
authorMarkus Strauss <Markus@ITstrauss.eu>
Fri, 28 Oct 2011 19:43:05 +0000 (21:43 +0200)
committerMarkus Strauss <Markus@ITstrauss.eu>
Fri, 28 Oct 2011 19:43:05 +0000 (21:43 +0200)
manifests/service/enabled.pp

index 1a71f4db0ec0af7458705e0b4e2468633e399e88..d750914ceb87e1983254640e2899726a6619a7bc 100644 (file)
@@ -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,
     }