cloudron-support: make troubleshoot script work when not set up yet

This commit is contained in:
Girish Ramakrishnan
2025-12-30 16:48:30 +01:00
parent a02e933375
commit 60420c3e32

View File

@@ -648,17 +648,26 @@ function troubleshoot() {
check_docker
check_docker_version
check_host_mysql
check_nginx # requires mysql to be checked
check_dashboard_cert
check_dashboard_site_loopback # checks website via loopback
check_db_migrations
check_services
check_box
check_netplan
check_dns
check_dashboard_site_domain # check website via domain name
check_expired_domain
check_unbound # this is less fatal after 8.0
local -r dashboard_domain=$(mysql -NB -uroot -ppassword -e "SELECT value FROM box.settings WHERE name='dashboard_domain'" 2>/dev/null)
if [[ -z "${dashboard_domain}" ]]; then
[[ -f /home/yellowtent/box/VERSION ]] && version=$(cat /home/yellowtent/box/VERSION) || version='<unknown>'
warn "Cloudron v${version} has not been set up yet. Visit https://<IP> to set up the dashboard."
else
check_nginx # requires mysql to be checked
check_dashboard_cert
check_dashboard_site_loopback # checks website via loopback
check_db_migrations
check_services
check_box
check_dashboard_site_domain # check website via domain name
check_expired_domain
fi
}
function cleanup_disk_space() {