From 147fcede0e31e24c7734cbcf0b608c3f1f310924 Mon Sep 17 00:00:00 2001 From: Markus Strauss Date: Fri, 28 Oct 2011 21:43:05 +0200 Subject: small delay before service restart so that runit can eventually create the supervise dir. --- manifests/service/enabled.pp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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, } -- cgit v1.2.3