X-Git-Url: https://git.sthu.org/?a=blobdiff_plain;f=nsd%2Fnsd-dynipwatch;h=4a650b0eaf4ec7a5f3b2fa4e63f1a4513180c2ec;hb=ba8d944658a4e8b99d9c5e4762da74ca5475d213;hp=bfdb8407bad273f34f3cf78b7d3e5038be28a69d;hpb=7bc50756b64ad2e0ecf4ff343b34cab1a453c5e4;p=shutils.git diff --git a/nsd/nsd-dynipwatch b/nsd/nsd-dynipwatch index bfdb840..4a650b0 100755 --- a/nsd/nsd-dynipwatch +++ b/nsd/nsd-dynipwatch @@ -48,6 +48,7 @@ function setSerialInZonefile # function run() { + touch ${watchfile} while true; do inotifywait -q -t 30 -e close_write "${watchfile}" > /dev/null ret=$? @@ -68,6 +69,7 @@ function run() echo " Update IP address. New serial ${serial}." setAddrInZonefile "${host}" "${zonefile}" "${newip}" setSerialInZonefile "${zonefile}" "${serial}" + /etc/nsd3/signzone.sh sthu.org nsdc rebuild && nsdc reload && nsdc notify fi done