#!/bin/bash
|
source {dnssec_conffile}
|
pardomain="${1::-1}"
|
|
echo "$1 $2 $3 $4 domain: $domain" > /tmp/.last-call-to-dnssec-update
|
|
if [ -z "$1" ];then
|
echo "No domain given"
|
exit 1
|
fi
|
|
#connect to database
|
mysqlcheck=`mysql -u $dbuser --password=$dbpass -h $dbhost -Bse "use $dbase; show tables;" | wc -c`
|
if [ "$mysqlcheck" = 0 ];then
|
echo "could not connect to database"
|
exit 0
|
fi
|
|
rm $bindpath/K$pardomain.+*.key
|
rm "$bindpath/$filespre$pardomain.signed"
|
rm "$bindpath/dsset-$pardomain."
|
|
echo "DNSSEC Keys and zonefile for $pardomain deleted"
|
|
exit 0
|