cloudron-support: display last cert renewal log file

This commit is contained in:
Girish Ramakrishnan
2024-01-29 15:07:40 +01:00
parent 0a4b0688a8
commit 00bbb4242d

View File

@@ -190,6 +190,10 @@ function check_dashboard_cert() {
if ! openssl x509 -checkend 100 -noout -in "${cert_file}" >/dev/null 2>&1; then
fail "Certificate has expired. Certificate expired at ${cert_expiry_date}"
local -r task_id=$(mysql -NB -uroot -ppassword -e "SELECT id FROM box.tasks WHERE type='checkCerts' ORDER BY id DESC LIMIT 1" 2>/dev/null)
echo -e "\tPlease check /home/yellowtent/platformdata/logs/tasks/${task_id}.log for last cert renewal logs"
echo -e "\tCommon issues include expiry of domain's API key OR incoming http port 80 not being open"
exit 1
fi
}
@@ -368,7 +372,6 @@ function troubleshoot() {
check_node
check_docker
check_host_mysql
check_dashboard_cert # do not restart nginx blindly, won't come up without valid cert
check_nginx # requires mysql to be checked
check_dashboard_site_loopback # checks website via loopback
check_box