File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ domain=$2
1515aliases=$3
1616
1717# LE API
18- API =' https://acme-v02.api.letsencrypt.org'
18+ LE_API =' https://acme-v02.api.letsencrypt.org'
1919
2020# Includes
2121source $HESTIA /func/main.sh
9898fi
9999
100100# Requesting nonce / STEP 1
101- answer=$( curl -s -I " $API /directory" )
101+ answer=$( curl -s -I " $LE_API /directory" )
102102nonce=$( echo " $answer " | grep Nonce | cut -f2 -d \ | tr -d ' \r\n' )
103103status=$( echo " $answer " | grep HTTP/1.1 | tail -n1 | cut -f 2 -d ' ' )
104104if [[ " $status " -ne 200 ]]; then
105105 check_result $E_CONNECT " Let's Encrypt nonce request status $status "
106106fi
107107
108108# Placing new order / STEP 2
109- url=" $API /acme/new-order"
109+ url=" $LE_API /acme/new-order"
110110payload=' {"identifiers":['
111111for identifier in $( echo $domain ,$aliases | tr ' ,' ' \n' | sort -u) ; do
112112 payload=$payload ' {"type":"dns","value":"' $identifier ' "},'
Original file line number Diff line number Diff line change 1313user=$1
1414
1515# LE API
16- API =' https://acme-v02.api.letsencrypt.org'
16+ LE_API =' https://acme-v02.api.letsencrypt.org'
1717
1818# Includes
1919source $HESTIA /func/main.sh
103103
104104
105105# Requesting ACME nonce
106- nonce=$( curl -s -I " $API /directory" | grep Nonce | cut -f 2 -d \ | tr -d ' \r\n' )
106+ nonce=$( curl -s -I " $LE_API /directory" | grep Nonce | cut -f 2 -d \ | tr -d ' \r\n' )
107107
108108# Creating ACME account
109- url=" $API /acme/new-acct"
109+ url=" $LE_API /acme/new-acct"
110110payload=' {"termsOfServiceAgreed": true}'
111111answer=$( query_le_v2 " $url " " $payload " " $nonce " )
112112kid=$( echo " $answer " | grep Location: | cut -f2 -d ' ' | tr -d ' \r' )
You can’t perform that action at this time.
0 commit comments