Loading ...
Sorry, an error occurred while loading the content.

Domain Expiry Check shell script -- VERY USEFUL

Expand Messages
  • Thad Floryan
    One correspondent in the Usenet ba.internet group wrote he lost one of his domains -- no thanks to the clowns at Tucows -- and another person responded with
    Message 1 of 3 , Apr 4, 2013
    • 0 Attachment
      One correspondent in the Usenet ba.internet group wrote he lost one of
      his domains -- no thanks to the clowns at Tucows -- and another person
      responded with this URL:

      http://www.cyberciti.biz/tips/domain-check-script.html

      where we find this comment:

      " I've already written about a shell script to check / monitor
      " domain renew / expiration date here. Now I’ve modified matt’s
      " domain-check script to support additional C/TLDs .in, .biz, .org
      " and .info domains. I've also added 5 seconds delay to avoid
      " whois server rejecting query. This script checks to see if a
      " domain has expired. It can be run in interactive and batch mode,
      " and provides facilities to alarm if a domain is about to expire
      " in advance.

      Usage examples are at the above URL.

      Download (15kB):

      http://www.cyberciti.biz/files/scripts/domain-check-2.txt

      Quick installation example:

      $ wget http://www.cyberciti.biz/files/scripts/domain-check-2.txt
      $ mv domain-check-2.txt domain-check
      $ chmod +x domain-check
      $ ./domain-check -d vivekgite.com

      The script is well commented and a quick perusal reveals it is safe.

      It could be run in a cron job and this can help those who forget when
      their domains expire and are lost due to domain squatters gobbling-up
      and poaching expired domains and requesting a ransom for their return.

      It seems Tucows and Network Solutions are among the insidious poachers.

      At this point now that I'm "technically" retired, I simply add an entry
      to ~/.appt [for the appt program] to alert me 2 months before my domain
      expires since I only have to manage one domain now, thadlabs.com

      For those managing multiple domains and who don't have the appt program
      the above script could prove very useful since losing a domain can cost
      mucho $$$.

      Here's the script's output querying my domain (spaces compressed):

      $ ./domain-check
      Usage: ./domain-check [ -e email ] [ -x expir_days ] [-q] [-a] [-h]
      {[ -d domain_name ]} || { -f domainfile}

      -a : Send a warning message through email
      -d domain : Domain to analyze (interactive mode)
      -e email address : Email address to send expiration notices
      -f domain file : File with a list of domains
      -h : Print this screen
      -s whois server : Whois sever to query for information
      -q : Don't print anything on the console
      -x days : Domain expiration interval (eg. if domain_date < days)

      $ ./domain-check -d thadlabs.com
      Domain Registrar Status Expires Days Left
      ---------------- ----------------- -------- ----------- ---------
      thadlabs.com NETWORK SOLUTIONS Valid 17-feb-2014 319


      Thad
    • J
      ... Thanks Thad! And great timing too, I have a couple domain names that are coming due that I d forgotten about until I played with this script. One of them
      Message 2 of 3 , Apr 4, 2013
      • 0 Attachment
        On Thu, Apr 4, 2013 at 4:38 AM, Thad Floryan <thad@...> wrote:
        >
        > One correspondent in the Usenet ba.internet group wrote he lost one of
        > his domains -- no thanks to the clowns at Tucows -- and another person
        > responded with this URL:
        >
        > http://www.cyberciti.biz/tips/domain-check-script.html
        >
        > where we find this comment:
        >
        > " I've already written about a shell script to check / monitor
        > " domain renew / expiration date here. Now I’ve modified matt’s
        > " domain-check script to support additional C/TLDs .in, .biz, .org
        > " and .info domains. I've also added 5 seconds delay to avoid
        > " whois server rejecting query. This script checks to see if a
        > " domain has expired. It can be run in interactive and batch mode,
        > " and provides facilities to alarm if a domain is about to expire
        > " in advance.
        >
        > Usage examples are at the above URL.
        >
        > Download (15kB):
        >
        > http://www.cyberciti.biz/files/scripts/domain-check-2.txt

        Thanks Thad! And great timing too, I have a couple domain names that
        are coming due that I'd forgotten about until I played with this
        script. One of them is due this month and I had forgotten all about
        it. Heh, this is a great little script.
      • thad_floryan
        ... Hi Jeff, You re very welcome! I m always keeping an eye open for little gems like the above. I still need to update my makehosts script to handle more
        Message 3 of 3 , Apr 4, 2013
        • 0 Attachment
          --- In linux@yahoogroups.com, J <dreadpiratejeff@...> wrote:
          >
          > On Thu, Apr 4, 2013 at 4:38 AM, Thad Floryan <thad@...> wrote:
          > > [...]
          > > http://www.cyberciti.biz/tips/domain-check-script.html
          > > [...]
          > > http://www.cyberciti.biz/files/scripts/domain-check-2.txt
          > > [...]
          >
          > Thanks Thad! And great timing too, I have a couple domain names that
          > are coming due that I'd forgotten about until I played with this
          > script. One of them is due this month and I had forgotten all about
          > it. Heh, this is a great little script.

          Hi Jeff,

          You're very welcome! I'm always keeping an eye open for little gems
          like the above. I still need to update my 'makehosts' script to handle
          more evil adware and malware sites -- I will get a round tuit. :-)

          Thad
        Your message has been successfully submitted and would be delivered to recipients shortly.