From a1343116634ae8d408dc1aa85bb01a0e3742d800 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Wed, 3 Jul 2019 11:07:50 -0700 Subject: [PATCH] letsencrypt: Force commands to be non-interactive This fixes issues with revoking certificates. Signed-off-by: Sunil Mohan Adapa Reviewed-by: Joseph Nuthalapati --- actions/letsencrypt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/actions/letsencrypt b/actions/letsencrypt index 77941c7f5..c2ce1d70f 100755 --- a/actions/letsencrypt +++ b/actions/letsencrypt @@ -190,7 +190,8 @@ def subcommand_revoke(arguments): domain = arguments.domain command = [ - 'certbot', 'revoke', '--domain', domain, '--cert-path', + 'certbot', 'revoke', '--non-interactive', '--domain', domain, + '--cert-path', os.path.join(le.LIVE_DIRECTORY, domain, 'cert.pem') ] if TEST_MODE: @@ -211,7 +212,7 @@ def subcommand_obtain(arguments): domain = arguments.domain command = [ - 'certbot', 'certonly', '--text', '--agree-tos', + 'certbot', 'certonly', '--non-interactive', '--text', '--agree-tos', '--register-unsafely-without-email', '--domain', arguments.domain, '--authenticator', AUTHENTICATOR, '--webroot-path', WEB_ROOT_PATH, '--renew-by-default' @@ -488,7 +489,7 @@ def subcommand_run_post_hooks(arguments): def subcommand_delete(arguments): """Disable a domain and delete the certificate.""" domain = arguments.domain - command = ['certbot', 'delete', '--cert-name', domain] + command = ['certbot', 'delete', '--non-interactive', '--cert-name', domain] process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE) _, stderr = process.communicate()