diff options
author | Markus Strauss <Markus@ITstrauss.eu> | 2011-10-28 21:43:05 +0200 |
---|---|---|
committer | Markus Strauss <Markus@ITstrauss.eu> | 2011-10-28 21:43:05 +0200 |
commit | 147fcede0e31e24c7734cbcf0b608c3f1f310924 (patch) | |
tree | e4c3a5b7c541d0d078fbaa05a573a8189f2c3343 | |
parent | 80dd5f659566d11b4f210b218e0c254271f1cb24 (diff) | |
download | puppet-runit-147fcede0e31e24c7734cbcf0b608c3f1f310924.tar.gz puppet-runit-147fcede0e31e24c7734cbcf0b608c3f1f310924.tar.bz2 |
small delay before service restart so that runit can eventually create the supervise dir.
-rw-r--r-- | manifests/service/enabled.pp | 4 |
1 files changed, 3 insertions, 1 deletions
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, } |