certbot: Don't prompt when installing apt packages.

The comment included in this commit explains the somewhat messy
situation that requires running certbot twice as part of this
installer.

Fixes #8486.
This commit is contained in:
Tim Abbott 2018-03-28 17:07:54 -07:00
parent f5a57dc614
commit 5fb3bff67e
1 changed files with 5 additions and 0 deletions

View File

@ -75,6 +75,11 @@ CERTBOT_PATH="/usr/local/sbin/certbot-auto"
wget -q https://dl.eff.org/certbot-auto -O "$CERTBOT_PATH"
chmod a+x "$CERTBOT_PATH"
# First, we install the OS packages with --quiet, to suppress `apt`
# prompting the user for input. This can't be part of the same
# invocation as gets the certs, since `certonly --quiet --force-interactive`
# rejects the Certbot ToS, causing Certbot to fail.
"$CERTBOT_PATH" --os-packages-only --quiet
# We don't use --no-interactive, because certbot needs to ask the user
# to agree to the Let's Encrypt Subscriber Agreement (aka ToS).
# Passing --force-interactive suppresses a warning, but also brings up