domain already exists

When you want to add a domain to a directadmin server and you get the message that it already exists but you can’t find it in directadmin, there might be some lingering files left over. This script will let you find them.

#!/bin/bash
DOMAIN=$1

if [[ -z "$DOMAIN" ]] ; then
	echo "Usage: "$0" domain"
	exit;
fi

echo "Bind config          : "`grep $DOMAIN /etc/named.conf`
echo "Bind zone            : "`ls -l /var/named/$DOMAIN.db`
echo "Virtual domains list : "`grep $DOMAIN /etc/virtual/domains`
echo "Virtual domainowners : "`grep $DOMAIN /etc/virtual/domainowners`
echo "Virtual domain config: "`ls -ld /etc/virtual/$DOMAIN`
echo "rndc file            : "`ls -l /var/named/*.nzf`

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

fifteen − nine =