In this economy getting your small business web hosting clients to pay for their web hosting can prove to be quite a challenge. I don’t charge very much to my clients for web hosting so I expect to be paid on time for their annual renewals. Therefore I have taken a zero tolerance policy towards late pays. With that said I would like to share a couple of things I do to my clients that FAIL to pay on time.

The first thing I do is disable their email. Media Temple Grid Server account holders can log into their Account Center and click on the Admin button and then on the (gs) Grid-Service Control Panel page click on Enable/Disable Email from this page you can disable the whole domain’s email capabilities.

Now that we have that done we can disable their web site. I chose to take care of this task programmatically through use of a very simple shell script (Linux Shell Scripting Tutorial). The following is script I created and you can take this and fill in the blanks for your own script:


clear
echo "What website would you like to suspend?"
read website
mv /nfs/c02/h11/mnt/XXXXX/domains/$website/html /nfs/c02/h11/mnt/XXXXX/domains/$website/html.bak
mkdir /nfs/c02/h11/mnt/XXXXX/domains/$website/html
touch /nfs/c02/h11/mnt/XXXXX/domains/$website/html/index.html
echo "Website Suspended" > /nfs/c02/h11/mnt/XXXXX/domains/$website/html/index.html

Now to explain the script a bit:

  1. Open vi and paste this in and replace XXXXX with your account number. You will also need to replace the part at the beginning of the paths that starts with ” /nfs/c02/h11/mnt/” as that part is specific to the server you are on.
  2. Once you have that done save your script with an “sh” extension (ie disablesite.sh). I saved my script in my home directory so that I can execute it right after I log in through SSH.
  3. Finally, to execute the script, navigate to the directory you saved it in an then type “sh yourscriptname.sh” and hit enter! The script will clear the screen and leave you with a question… “What website would you like to suspend?”. Answer that question with the precise domain name of directory you want to suspend and hit Enter again. At this point the script will rename that domains html directory to html.bak and create a new html directory with a new index.html file that displays “Website Suspended”.

There are many other things one could do with this script like set up a Cron job to check a file that contains expiration dates for each of your sites and automatically disables them for you. Whatever you do be very careful in how you set up your script as this is pretty powerful and you could easily mess things up for yourself .

Also, it’s worth noting that if you use this script on your clients site you could very well embarrass them to the point where they just decide to not use your services ever again.

Leave a Reply