dnssec-sign
changeset 6 920c1a51ba0e
child 8 a1eefce2bd5e
equal deleted inserted replaced
5:960f5e7f78eb 6:920c1a51ba0e
       
     1 #!/bin/bash
       
     2 
       
     3 ZONE_DIR="/etc/bind/master"
       
     4 ZSKLIVE=60
       
     5 
       
     6 function AENDERUNG {
       
     7 	for DOMAIN in $ZONE_DIR/*
       
     8 	do
       
     9 		find $DOMAIN -name "*.signed" -mmin -1440 >/dev/null && echo $DOMAIN
       
    10 	done
       
    11 }
       
    12 
       
    13 AENDERUNG
       
    14 
       
    15 for ZONE in `AENDERUNG`
       
    16 do
       
    17 	cd $ZONE
       
    18 
       
    19 	DOMAIN=${ZONE##/*/}
       
    20 
       
    21 	STARTTIME=`ls index.zsk -l --time-style=+%s | cut -d' ' -f6`
       
    22 	ENDTIME=$[STARTTIME + $[ZSKLIVE * 86400]]
       
    23 
       
    24 	dnssec-signzone -e `date -d @$ENDTIME +%Y%m%d000000` $DOMAIN
       
    25 
       
    26 done