From 4d43221d0b3caef9537aab926e0ea5b9c7c73182 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sat, 26 Oct 2013 11:30:34 -0200 Subject: Custom restart command --- manifests/init.pp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'manifests/init.pp') diff --git a/manifests/init.pp b/manifests/init.pp index 740713d..37df498 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -28,6 +28,10 @@ class syslog-ng( ensure => running, hasrestart => true, hasstatus => false, + # Somehow syslog-ng is not returning if it was killed due to lack of + # memory or other issue. A simple start is not enough and we need to + # ensure it's properly stopped first. + restart => '/etc/init.d/syslog-ng stop; /etc/init.d/syslog-ng start', pattern => '/usr/sbin/syslog-ng', require => File["/etc/syslog-ng/syslog-ng.conf"], } -- cgit v1.2.3