fix: non-interactive

This commit is contained in:
Mahdi Dibaiee 2017-02-22 13:33:15 +03:30
parent f643980487
commit 0dfe09d620

View File

@ -64,7 +64,7 @@ module System.Serverman.Actions.Nginx (nginx) where
putStrLn $ "restarted " ++ show serverService putStrLn $ "restarted " ++ show serverService
createCert path cmd = do createCert path cmd = do
result <- execute cmd ["certonly", "--webroot", "--webroot-path", directory, "-d", domain, "--email", email, "--agree-tos"] "" False result <- execute cmd ["certonly", "--webroot", "--webroot-path", directory, "-d", domain, "--email", email, "--agree-tos", "-n"] "" False
case result of case result of
Left _ -> if cmd == "letsencrypt" then createCert path "certbot" else return () Left _ -> if cmd == "letsencrypt" then createCert path "certbot" else return ()
Right stdout -> do Right stdout -> do