Monitoring a Linux process by PID and sending a e-mail notification upon failure

Posted by & filed under BASH, Email, Linux, Programming.

One of my clients needs their vendor to be alerted when their Backup Exec service crashes. I wrote the following quick-n-dirty batch script intended to be ran as a cron job.

And the cron line would be something like this:

Removing MX records from a Microsoft DNS Server via script

Posted by & filed under DNS, Email, Programming, Server Admin.

We recently switched our barracuda system from using two equally weighted MX records to using one MX record that points to two same-named A records. We are hoping that this will help better load balance the Barracuda cluster. I wrote a quick-n-dirty batch script to remove the second barracuda MX record from our DNS zones:

for /f %%h in (domains.txt) do dnscmd /RecordDelete %%h @ MX 10 /f

This script takes the input file domains.txt and processes each domain contained in the text file. The format is one domain per line…