Skip to content

Commit 2ae8fa9

Browse files
committed
Change api variable to le_api, api is already used by hestia itself.
1 parent f92b539 commit 2ae8fa9

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

bin/v-add-letsencrypt-domain

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ domain=$2
1515
aliases=$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
2121
source $HESTIA/func/main.sh
@@ -98,15 +98,15 @@ else
9898
fi
9999

100100
# Requesting nonce / STEP 1
101-
answer=$(curl -s -I "$API/directory")
101+
answer=$(curl -s -I "$LE_API/directory")
102102
nonce=$(echo "$answer" |grep Nonce |cut -f2 -d \ |tr -d '\r\n')
103103
status=$(echo "$answer"|grep HTTP/1.1 |tail -n1 |cut -f 2 -d ' ')
104104
if [[ "$status" -ne 200 ]]; then
105105
check_result $E_CONNECT "Let's Encrypt nonce request status $status"
106106
fi
107107

108108
# Placing new order / STEP 2
109-
url="$API/acme/new-order"
109+
url="$LE_API/acme/new-order"
110110
payload='{"identifiers":['
111111
for identifier in $(echo $domain,$aliases |tr ',' '\n' |sort -u); do
112112
payload=$payload'{"type":"dns","value":"'$identifier'"},'

bin/v-add-letsencrypt-user

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
user=$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
1919
source $HESTIA/func/main.sh
@@ -103,10 +103,10 @@ fi
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"
110110
payload='{"termsOfServiceAgreed": true}'
111111
answer=$(query_le_v2 "$url" "$payload" "$nonce")
112112
kid=$(echo "$answer" |grep Location: |cut -f2 -d ' '|tr -d '\r')

0 commit comments

Comments
 (0)