summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Strauss <Markus@ITstrauss.eu>2012-03-09 18:00:35 +0100
committerMarkus Strauss <Markus@ITstrauss.eu>2012-03-09 18:00:35 +0100
commit83f142472df5e03bc252c761c9fa5413b396845d (patch)
tree4cbd4350214d38b5abc4fa8a206a964891ca0e2f
parentfcc55c844e0dbe207c45c491fdf50e23ce7062be (diff)
downloadpuppet-runit-83f142472df5e03bc252c761c9fa5413b396845d.tar.gz
puppet-runit-83f142472df5e03bc252c761c9fa5413b396845d.tar.bz2
better service deactivation handling
-rw-r--r--manifests/service/enabled.pp5
1 files changed, 4 insertions, 1 deletions
diff --git a/manifests/service/enabled.pp b/manifests/service/enabled.pp
index 3808585..f3ffc64 100644
--- a/manifests/service/enabled.pp
+++ b/manifests/service/enabled.pp
@@ -2,7 +2,10 @@ define runit::service::enabled( $ensure = present, $timeout ) {
# enabling the service by creating a symlink in /etc/service
file { "/etc/service/${name}":
- target => "/etc/sv/${name}",
+ target => $ensure ? {
+ present => "/etc/sv/${name}",
+ default => undef,
+ },
ensure => $ensure ? {
present => link,
default => absent,