March 22, 2010

BASH IF/ELSE Mail Script

I had a request to track when a leased domain was expiring after we were finished using it.  Instead of manually giving status twice a day I decided to create a script to do the work for me.  The script is pretty well documented already, but the basic process is checking DOMAIN1.COM in a WHOIS search and analyzing the results.  If the DNS names servers point back to DOMAIN2.COM, I know that the domain is still registered to us and is still alive.  To check the WHOIS results, I am running a grep for DOMAIN2.COM, and if found the built-in command success/error shows a “0″.  If the results do not include DOMAIN2.COM, the command with error with a “1″.  Based on the error code value, I send an email telling if the domain is UP or DOWN. Read the rest of this entry »

March 22, 2010

Email Domain Migration Phase II

Here is the second part of our migration, we attempted to separate the two mailboxes, one for domain1 that will will forward to domain2 and will have an autoresponder, and domain2 that will be the main mailbox going forward.  Here are the scripts: Read the rest of this entry »

March 22, 2010

Subverison Repository Add

Here is my script for the day, more than my usual one liner.  This assumes that you have subversion installed and are tired of manually creating repositories all the time.  My subversion user is called svc-subversion, and if you worked for Gussow, you might understand why.  Before SVN caught on, I only had two main repositories, then people kept requesting them over and over instead of VSS. Read the rest of this entry »

Switch to our mobile site