cloudron-support: whois may not have expiry info
This commit is contained in:
@@ -184,6 +184,11 @@ function check_expired_domain() {
|
||||
|
||||
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}')
|
||||
if [[ -z "${expdate}" ]]; then
|
||||
echo "Domain expiry check skipped because whois does not have this information"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
local -r expdate_secs=$(date -d"$expdate" +%s)
|
||||
local -r curdate_secs="$(date +%s)"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user