This program runs a whois command to check on the status of a domain(s). The result is then sent in an email.
bundle install
cp .env.example .env
- Fill in
.env
variables. Unless you set ENVIRONMENT to production, emails will be sent to mailcatcher and you can use any fake email addresses you want.
- ENVIRONMENT - set to production so email will actually be set
- DOMAINS - comma separated list of domains to check. Example: 'forset.ge' or 'forset.ge, datafest.ge'
- EMAIL_SUBJECT - the subject line for the email notification
rake domain_checker:run
-> Run the scraper!rake domain_checker:schedule:run_daily
-> Schedule a cron job to runrake domain_cheker:run
according to the confid/schedule.rb file.
When you run the domain checker, the following happens:
- Each domain is checked using the command: whois domain | grep 'Domain Status'
- The output is recorded
- An notification of the output is emailed