From 648e1e50a015636d129bd4d7357c779688685cc0 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 7 Feb 2016 17:04:34 -0400 Subject: propellor spin --- src/Propellor/Property/Apache.hs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/Propellor') 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 = [ "" -- cgit v1.2.3