From 48214e45a68cd664374a265d274163fc36382bb1 Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Fri, 7 Nov 2014 15:36:23 +0100 Subject: [PATCH] stop monit using service Getting rid of explicit /etc/init.d/ invocations as those may disappear. Signed-off-by: Helmut Grohne --- modules/monit/manifests/init.pp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/monit/manifests/init.pp b/modules/monit/manifests/init.pp index e2809f807..2e0e68aa2 100644 --- a/modules/monit/manifests/init.pp +++ b/modules/monit/manifests/init.pp @@ -31,7 +31,7 @@ class monit { ensure => directory, mode => '0755', purge => true, - notify => Exec['monit stop'], + notify => Exec['service monit stop'], require => Package['monit'], } file { '/etc/monit/monit.d': @@ -54,11 +54,10 @@ class monit { file { '/etc/default/monit': content => template('monit/default.erb'), require => Package['monit'], - notify => Exec['monit stop'] + notify => Exec['service monit stop'] } - exec { 'monit stop': - path => '/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin', + exec { 'service monit stop': refreshonly => true, } } -- 2.20.1