Skip to content

Commit 2caf941

Browse files
authored
Merge pull request hestiacp#2854 from jaapmarcus/fix/improve-le-logging
Improve error reporting Letsencrypt
2 parents a2eb03a + a052c5c commit 2caf941

File tree

5 files changed

+13
-6
lines changed

5 files changed

+13
-6
lines changed

bin/v-add-letsencrypt-domain

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ for auth in $authz; do
386386
status=$(echo "$answer"|grep HTTP/ |tail -n1 |cut -f 2 -d ' ')
387387
details=$(echo "$answer"| grep detail | cut -f 1 -d ',' | cut -f 2-4 -d ':' | cut -f 2 -d '"')
388388

389-
debug_log "Step 5" "- status: ${status}\n- nonce: ${nonce}\n- validation: ${validation}\n- details: ${details}\n- answer: ${answer}"
389+
debug_log "Step 5" "- status: ${status}\n- url: ${url}\n- nonce: ${nonce}\n- validation: ${validation}\n- details: ${details}\n- answer: ${answer}"
390390

391391
if [[ "$status" -ne 200 ]]; then
392392
# Delete DNS CAA record
@@ -400,8 +400,14 @@ for auth in $authz; do
400400
fi
401401
fi
402402
fi
403-
debug_log "Abort Step 5" "=> Wrong status"
404-
check_result "$E_CONNECT" "Let's Encrypt validation status $status ($domain). Details: $details"
403+
# Download debug info from LE server
404+
result=$(wget -qO- $url)
405+
debug_log "Debug information Step 5" "$result"
406+
details=$(echo $result | jq '.error.detail' )
407+
error_code=$(echo $result | jq '.error.status' )
408+
409+
debug_log "Abort Step 5" "=> Wrong status"
410+
check_result "$E_CONNECT" "Let's Encrypt validation status $status ($domain). Details: $error_code:$details"
405411
fi
406412

407413
i=$((i + 1))

install/hst-install-debian.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ software="nginx apache2 apache2-utils apache2-suexec-custom
5353
dnsutils bsdmainutils cron hestia=${HESTIA_INSTALL_VER} hestia-nginx
5454
hestia-php expect libmail-dkim-perl unrar-free vim-common acl sysstat
5555
rsyslog openssh-server util-linux ipset libapache2-mpm-itk zstd
56-
lsb-release"
56+
lsb-release jq"
5757

5858

5959
installer_dependencies="apt-transport-https curl dirmngr gnupg wget ca-certificates"

install/hst-install-ubuntu.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ software="apache2 apache2.2-common apache2-suexec-custom apache2-utils
5252
php$fpm_v-opcache php$fpm_v-pspell php$fpm_v-readline php$fpm_v-xml
5353
postgresql postgresql-contrib proftpd-basic quota rrdtool spamassassin sudo hestia=${HESTIA_INSTALL_VER}
5454
hestia-nginx hestia-php vim-common vsftpd whois unzip zip acl sysstat setpriv rsyslog
55-
ipset libonig5 libzip5 openssh-server lsb-release zstd"
55+
ipset libonig5 libzip5 openssh-server lsb-release zstd jq"
5656

5757
installer_dependencies="apt-transport-https curl dirmngr gnupg wget software-properties-common ca-certificates"
5858

src/deb/hestia/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Section: admin
66
Maintainer: HestiaCP <info@hestiacp.com>
77
Homepage: https://www.hestiacp.com
88
Architecture: amd64
9-
Depends: bash, awk, sed, acl, sysstat, setpriv | util-linux (>= 2.33), zstd, lsb-release, idn2
9+
Depends: bash, awk, sed, acl, sysstat, setpriv | util-linux (>= 2.33), zstd, lsb-release, idn2, jq
1010
Description: hestia
1111
hestia is an open source hosting control panel.
1212
hestia has a clean and focused interface without the clutter.

src/rpm/hestia/hestia.spec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Requires: acl
1515
Requires: sysstat
1616
Requires: (setpriv or util-linux)
1717
Requires: zstd
18+
Requires: jq
1819
Conflicts: vesta
1920
Provides: hestia = %{version}
2021
BuildRequires: systemd-rpm-macros

0 commit comments

Comments
 (0)