diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Propellor/Property/Apache.hs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/Propellor/Property/Apache.hs b/src/Propellor/Property/Apache.hs index 5b8128a4..e841be9e 100644 --- a/src/Propellor/Property/Apache.hs +++ b/src/Propellor/Property/Apache.hs @@ -180,16 +180,19 @@ httpsVirtualHost' domain docroot letos addedcfg = setup , "RewriteRule ^/(.*) https://" ++ domain ++ "/$1 [L,R,NE]" ] certinstaller _domain certfile privkeyfile chainfile _fullchainfile = - File.hasContent (sslconffile "letsencrypt") - ( vhost (Port 443) + combineProperties (domain ++ " ssl cert installed") + [ File.dirExists (takeDirectory cf) + , File.hasContent cf $ vhost (Port 443) [ "SSLEngine on" , "SSLCertificateFile " ++ certfile , "SSLCertificateKeyFile" ++ privkeyfile , "SSLCertificateChainFile " ++ chainfile ] - ) -- always reload; the cert has changed - `before` reloaded + , reloaded + ] + where + cf = sslconffile "letsencrypt" sslconffile s = "/etc/apache2/sites-available/ssl/" ++ domain ++ "/" ++ s ++ ".conf" vhost (Port p) ls = [ "<VirtualHost *:"++show p++">" |
