*Fetch agreement URL from API

This commit is contained in:
Derrick Hammer 2016-08-03 05:07:26 -04:00
commit a1d53e0489

View file

@ -41,11 +41,12 @@ fi
#----------------------------------------------------------#
api='https://acme-v01.api.letsencrypt.org'
agreement='https://letsencrypt.org/documents/LE-SA-v1.0.1-July-27-2015.pdf'
if [ -z "$email" ]; then
email=$(get_user_value '$CONTACT')
fi
agreement=$(curl -s -I "$api/terms" |grep Location |cut -f 2 -d \ |tr -d '\r\n')
# Generating key
key="$USER_DATA/ssl/user.key"
if [ ! -e "$key" ]; then