]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - modules/stunnel4/manifests/init.pp
Exec[stunnel_restart] depends on new init script
[dsa-puppet.git] / modules / stunnel4 / manifests / init.pp
index b9335eaabd337fdf2b101544cad152cf68c4ade6..fcedab8c3964dd960d997040d0406094e29d423c 100644 (file)
@@ -13,6 +13,7 @@ class stunnel4 {
                 ;
             "/etc/init.d/stunnel4":
                 source => "puppet:///modules/stunnel4/etc-init.d-stunnel4",
+                mode    => 555,
             ;
         }
     }
@@ -87,9 +88,19 @@ class stunnel4 {
                 ;
         "restart_stunnel":
                 command => "true && cd / && env -i /etc/init.d/stunnel4 restart",
-                require => [ File['/etc/stunnel/stunnel.conf'], Exec['enable_stunnel4'], Package['stunnel4'] ],
+                require => [ File['/etc/stunnel/stunnel.conf'],
+                             File['/etc/init.d/stunnel4'],
+                             Exec['enable_stunnel4'],
+                             Exec['kill_file_override'],
+                             Package['stunnel4']
+                           ],
                 refreshonly => true,
                 ;
+        "kill_file_override":
+                command => "sed -i -e 's/^FILES=/#&/' /etc/default/stunnel4",
+                onlyif => "grep -q '^FILES=' /etc/default/stunnel4",
+                require => [ Package['stunnel4'] ],
+                ;
     }
 }