diff --git a/scripts/cloudron-support b/scripts/cloudron-support index 964c47381..599626a1a 100755 --- a/scripts/cloudron-support +++ b/scripts/cloudron-support @@ -177,6 +177,11 @@ function check_hairpin_nat() { } function check_expired_domain() { + if ! command -v whois &> /dev/null; then + echo "Domain expiry check skipped because whois is not installed. Run 'apt install whois' to check" + exit 0 + fi + local -r dashboard_domain=$(mysql -NB -uroot -ppassword -e "SELECT value FROM box.settings WHERE name='dashboard_domain'" 2>/dev/null) local -r expdate=$(whois ${dashboard_domain} | egrep -i 'Expiration Date:|Expires on|Expiry Date:' | head -1 | awk '{print $NF}') local -r expdate_secs=$(date -d"$expdate" +%s)