print check

This commit is contained in:
Keagan McClelland
2020-08-04 15:50:42 -06:00
parent b26ad51ba2
commit 949f2f867c
2 changed files with 2 additions and 2 deletions

View File

@@ -183,6 +183,8 @@ startApp foundation = do
-- certbot renew loop
void . forkIO $ forever $ do
putStrLn $ "DOMAIN: " <> registryHostname (appSettings foundation)
putStrLn $ "CERT: " <> sslCertLocation (appSettings foundation)
shouldRenew <- doesSslNeedRenew (sslCertLocation $ appSettings foundation)
when shouldRenew $ do
putStrLn @Text "Renewing SSL Certs."

View File

@@ -49,7 +49,5 @@ doesSslNeedRenew cert = do
renewSslCerts :: FilePath -> ReaderT RegistryCtx IO ()
renewSslCerts cert = do
domain <- asks $ registryHostname . appSettings
liftIO $ putStrLn $ "DOMAIN: " <> domain
liftIO $ putStrLn $ "CERT: " <> cert
void . liftIO $ system [i|certbot renew|]
void . liftIO $ system [i|cp /etc/letsencrypt/live/#{domain}/fullchain.pem #{cert}|]