diff --git a/README.md b/README.md index 8c3bd886..ae1eafff 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ application. 3. Modify configuration: - Add domains and email addresses to init-letsencrypt.sh +- Specify if you want to subscribe to EFF mailings - Replace all occurrences of example.org with primary domain (the first one you added to init-letsencrypt.sh) in data/nginx/app.conf 4. Run the init script: diff --git a/init-letsencrypt.sh b/init-letsencrypt.sh index 95daadb0..936ac7ce 100755 --- a/init-letsencrypt.sh +++ b/init-letsencrypt.sh @@ -10,6 +10,7 @@ rsa_key_size=4096 data_path="./data/certbot" email="" # Adding a valid address is strongly recommended staging=0 # Set to 1 if you're testing your setup to avoid hitting request limits +subscribe_to_eff=0 # Set to 1 if you provided an e-mail address and want to subscribe to EFF mailings if [ -d "$data_path" ]; then read -p "Existing data found for $domains. Continue and replace existing certificate? (y/N) " decision @@ -60,7 +61,14 @@ done # Select appropriate email arg case "$email" in "") email_arg="--register-unsafely-without-email" ;; - *) email_arg="--email $email" ;; + *) email_arg="--email $email" + if [ $subscribe_to_eff == "1" ] + then + subscribe_arg="--eff-email" + else + subscribe_arg="--no-eff-email" + fi + ;; esac # Enable staging mode if needed @@ -71,6 +79,7 @@ docker-compose run --rm --entrypoint "\ $staging_arg \ $email_arg \ $domain_args \ + $subscribe_arg \ --rsa-key-size $rsa_key_size \ --agree-tos \ --force-renewal" certbot