Remove email address prompt from Let's Encrypt installation (#462)

This commit is contained in:
Michał Chęciński
2026-02-27 13:07:14 +01:00
committed by GitHub
parent 207ef7b8c2
commit b2eebba19e
2 changed files with 2 additions and 10 deletions

View File

@@ -55,10 +55,6 @@ function Install() {
echo ""
if ($letsEncrypt -eq "y") {
Write-Host "(!) " -f cyan -nonewline
[string]$email = $( Read-Host ("Enter your email address (Let's Encrypt will send you certificate " +
"expiration reminders)") )
echo ""
$letsEncryptPath = "${outputDir}/letsencrypt"
if (!(Test-Path -Path $letsEncryptPath )) {
@@ -68,7 +64,7 @@ function Install() {
$certbotExp = "docker run -it --rm --name certbot -p ${certbotHttpsPort}:443 -p ${certbotHttpPort}:80 " + `
"-v ${outputDir}/letsencrypt:/etc/letsencrypt/ certbot/certbot " + `
"certonly{0} --standalone --noninteractive --agree-tos --preferred-challenges http " + `
"--email ${email} -d ${domain} --logs-dir /etc/letsencrypt/logs"
"-d ${domain} --logs-dir /etc/letsencrypt/logs"
Invoke-Expression ($certbotExp -f $qFlag)
}
}

6
run.sh
View File

@@ -80,16 +80,12 @@ function install() {
if [ "$LETS_ENCRYPT" == "y" ]
then
echo -e -n "${CYAN}(!)${NC} Enter your email address (Let's Encrypt will send you certificate expiration reminders): "
read EMAIL
echo ""
mkdir -p $OUTPUT_DIR/letsencrypt
docker pull certbot/certbot
docker run -it --rm --name certbot -p 80:80 -v $OUTPUT_DIR/letsencrypt:/etc/letsencrypt/ certbot/certbot \
certonly --standalone --noninteractive --agree-tos --preferred-challenges http \
--email $EMAIL -d $DOMAIN --logs-dir /etc/letsencrypt/logs
-d $DOMAIN --logs-dir /etc/letsencrypt/logs
fi
fi