summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Strauss <Markus@ITstrauss.eu>2011-11-01 11:49:00 -0400
committerMarkus Strauss <Markus@ITstrauss.eu>2011-11-01 11:49:00 -0400
commit67a3bcd0e562b2f06503d8d582c097ea7fa4dc89 (patch)
tree9104f9a2373a4951c128c23ef541a02812f27199
parent3543fd0b56b96339a934f15ed1f2fb5018a2dedd (diff)
downloadpuppet-runit-67a3bcd0e562b2f06503d8d582c097ea7fa4dc89.tar.gz
puppet-runit-67a3bcd0e562b2f06503d8d582c097ea7fa4dc89.tar.bz2
only managing the service en/disabling if $enable==true
-rw-r--r--manifests/service.pp12
1 files changed, 4 insertions, 8 deletions
diff --git a/manifests/service.pp b/manifests/service.pp
index ed0b050..54b10ad 100644
--- a/manifests/service.pp
+++ b/manifests/service.pp
@@ -59,14 +59,10 @@ define runit::service (
;
}
- # eventually enabling the service
- if $ensure == present and $enable == true {
- $_ensure_enabled = present
- } else {
- $_ensure_enabled = absent
+ # eventually enabling/disabling the service
+ if $enable == true {
+ debug( "Service ${name}: ${_ensure_enabled}" )
+ runit::service::enabled { $name: ensure => $ensure, timeout => $timeout }
}
- debug( "Service ${name}: ${_ensure_enabled}" )
-
- runit::service::enabled { $name: ensure => $_ensure_enabled }
}