Skip to content

Commit

Permalink
installer: update debuginfo
Browse files Browse the repository at this point in the history
  • Loading branch information
dlt-green committed Mar 6, 2024
1 parent ad956e1 commit 7e092fb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions node-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -715,10 +715,11 @@ DebugInfo() {
cd "/var/lib/$NODE" || exit
if [ -f .env ]; then
HOST=$(cat .env 2>/dev/null | grep _HOST | cut -d '=' -f 2)
VAR_STATUS="$(docker inspect "$(echo "$NODE" | sed 's/\//./g')" | jq -r '.[] .State .Health .Status')"
VAR_STATUS="$(docker inspect "$(echo "$NODE" | sed 's/\//./g')" | jq -r '.[] .State .Health .Status')" 2>/dev/null
if [ -z "$VAR_STATUS" ]; then VAR_STATUS="error"; fi
if [ "$VAR_STATUS" = 'healthy' ]; then VAR_STATUS="$gn"$VAR_STATUS"$xx"; else VAR_STATUS="$rd"$VAR_STATUS"$xx"; fi
echo "$NODE"": $VAR_STATUS"
echo "$(cat .env 2>/dev/null | grep _VERSION | sed 's/\([A-Z]\)/\L\1/g')"
echo "$(cat .env 2>/dev/null | grep 'VERSION\|PRUN' | sed 's/\([A-Z]\)/\L\1/g')"
if [ "$(cat .env 2>/dev/null | grep SSL_CONFIG | cut -d '=' -f 2)" = 'certs' ]; then
TMP="certificate: ""global"
if [ -d "/etc/letsencrypt/live/$HOST" ]; then cd "/etc/letsencrypt/live/$HOST" || exit; fi
Expand All @@ -727,7 +728,7 @@ DebugInfo() {
echo "$TMP"
if [ -s "fullchain.pem" ]; then
echo "valid until: ""$(openssl x509 -in "fullchain".pem -noout -enddate | cut -d '=' -f 2)"
else echo "valid until: ""$rd""err""$xx"; fi
else echo "valid until: ""$rd""error""$xx"; fi
else
TMP="certificate: ""let's encrypt"
if [ -d "/var/lib/$NODE/data/letsencrypt" ]; then cd "/var/lib/$NODE/data/letsencrypt" || exit; fi
Expand All @@ -738,7 +739,7 @@ DebugInfo() {
echo "$TMP"
if [ -s "$HOST.crt" ]; then
echo "valid until: ""$(openssl x509 -in "$HOST".crt -noout -enddate | cut -d '=' -f 2)"
else echo "valid until: ""$rd""err""$xx"; fi
else echo "valid until: ""$rd""error""$xx"; fi
fi
fi
echo ""
Expand Down

0 comments on commit 7e092fb

Please sign in to comment.