Let's try one last time to get it right.
[mirror/dsa-puppet.git] / modules / stunnel4 / manifests / init.pp
index 897ea83..d766846 100644 (file)
@@ -16,15 +16,30 @@ class stunnel4 {
                 mode    => 555,
             ;
         }
+
+        case $client {
+                true: {
+                    $certfile = "/etc/ssl/debian/certs/thishost.crt"
+                    $keyfile = "/etc/ssl/debian/keys/thishost.key"
+                    }
+                default: {
+                    $certfile = "/etc/exim4/ssl/thishost.crt"
+                    $keyfile = "/etc/exim4/ssl/thishost.key"
+                    }
+        }
+
         exec {
             "restart_stunnel_${name}":
-                    command => "true && cd / && env -i /etc/init.d/stunnel4 restart ${name}",
+                    command => "true && cd / && env -i /etc/init.d/stunnel4 restart puppet-${name}",
                     require => [ File['/etc/stunnel/stunnel.conf'],
                                  File['/etc/init.d/stunnel4'],
                                  Exec['enable_stunnel4'],
                                  Exec['kill_file_override'],
                                  Package['stunnel4']
                                ],
+                    subscribe => [ File[$certfile],
+                                   File[$keyfile]
+                                 ],
                     refreshonly => true,
                     ;
         }