Either 1 month or 2 weeks. But i think it is 2 weeks.
Ok i have a domain I am not going to renew so I’ll leave it ‘live’ rather than deleting it to see if I get a warning. From memory it has 3 weeks to go, so I should get the warning sometime next week
I am using this: domain-check-2/domain-check-2.sh at master · nixcraft/domain-check-2 · GitHub
Copy the code and save it as /scripts/domain-expiration-check/check.
Make it executable.
Create a file /scripts/domain-expiration-check/run and paste this:
#!/bin/sh
/usr/sbin/virtualmin list-domains --name-only > /scripts/domain-expiration-check/domains.txt
/scripts/domain-expiration-check/check -f /scripts/domain-expiration-check/domains.txt -q -a -e admin-to-notify@domain.com -x 30
Make it executable
Add a crontab like:
0 8 * * * /scripts/domain-expiration-check/run >/dev/null 2>&1
What it does
Run daily at 08:00 and if any domain has 30 days or less left before expiry, it will notify by email.
Adjust the crontab to your needs.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.