summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-10-26 11:30:34 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-10-26 11:30:34 -0200
commit4d43221d0b3caef9537aab926e0ea5b9c7c73182 (patch)
tree28486a1664429540d55721f9a7b0cd72abae2208
parent31bc7fa8d0c1c6a71bef21450e6b4bbe4e435337 (diff)
downloadpuppet-syslog-ng-4d43221d0b3caef9537aab926e0ea5b9c7c73182.tar.gz
puppet-syslog-ng-4d43221d0b3caef9537aab926e0ea5b9c7c73182.tar.bz2
Custom restart command
-rw-r--r--manifests/init.pp4
1 files changed, 4 insertions, 0 deletions
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"],
}