summaryrefslogtreecommitdiff
path: root/manifests/base.pp
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2015-11-20 22:43:06 +0100
committermh <mh@immerda.ch>2015-12-05 11:36:31 +0100
commit220d7af45dc4b1c334e2d3f50f2bc8ab54139093 (patch)
tree40dbd969522c93e4c1f55f0f1e7b3a6bc0f5b4fa /manifests/base.pp
parent353492eaa1c9047547b17161df4aa58ea3bf0a87 (diff)
make service restart more failsafe
Diffstat (limited to 'manifests/base.pp')
-rw-r--r--manifests/base.pp13
1 files changed, 9 insertions, 4 deletions
diff --git a/manifests/base.pp b/manifests/base.pp
index b5899fc..db6852a 100644
--- a/manifests/base.pp
+++ b/manifests/base.pp
@@ -8,14 +8,14 @@ class shorewall::base {
# This file has to be managed in place, so shorewall can find it
file {
'/etc/shorewall/shorewall.conf':
- require => Package[shorewall],
- notify => Service[shorewall],
+ require => Package['shorewall'],
+ notify => Exec['shorewall_check'],
owner => 'root',
group => 'root',
mode => '0644';
'/etc/shorewall/puppet':
ensure => directory,
- require => Package[shorewall],
+ require => Package['shorewall'],
owner => 'root',
group => 'root',
mode => '0644';
@@ -33,11 +33,16 @@ class shorewall::base {
changes => 'set /files/etc/shorewall/shorewall.conf/CONFIG_PATH \'"/etc/shorewall/puppet:/etc/shorewall:/usr/share/shorewall"\'',
lens => 'Shellvars.lns',
incl => '/etc/shorewall/shorewall.conf',
- notify => Service['shorewall'],
+ notify => Exec['shorewall_check'],
require => Package['shorewall'];
}
}
+ exec{'shorewall_check':
+ command => 'shorewall check',
+ refreshonly => true,
+ notify => Service['shorewall'],
+ }
service{'shorewall':
ensure => running,
enable => true,