A. Täffner
2016-01-20 c5f49d6cf71974f9804f8d2d4025be39a4231153
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/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