Updated the script to prompt for a email address to use with letsencrypt and sets --agree-tos and --no-eff-email
This commit is contained in:
@@ -18,6 +18,14 @@ if [[ -z "$DOMAIN" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Ask for email (NEW)
|
||||
read -p "Enter email address for Let's Encrypt notifications: " EMAIL
|
||||
|
||||
if [[ -z "$EMAIL" ]]; then
|
||||
echo "Email cannot be empty"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Ask for Cloudflare API token/key
|
||||
read -p "Enter your Cloudflare API Token/Key: " CF_API_KEY
|
||||
|
||||
@@ -51,6 +59,10 @@ chmod 600 /root/certbot-cloudflare/cloudflare.ini
|
||||
|
||||
echo "Requesting certificate for $DOMAIN ..."
|
||||
certbot certonly \
|
||||
--non-interactive \
|
||||
--agree-tos \
|
||||
--no-eff-email \
|
||||
--email "$EMAIL" \
|
||||
--dns-cloudflare \
|
||||
--dns-cloudflare-credentials /root/certbot-cloudflare/cloudflare.ini \
|
||||
-d "$DOMAIN"
|
||||
|
||||
Reference in New Issue
Block a user