From 83f142472df5e03bc252c761c9fa5413b396845d Mon Sep 17 00:00:00 2001 From: Markus Strauss Date: Fri, 9 Mar 2012 18:00:35 +0100 Subject: better service deactivation handling --- manifests/service/enabled.pp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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, -- cgit v1.2.3