]> git.sthu.org Git - shutils.git/commitdiff
nsd-dynipwatch: touch watchfile before inotify'ing
authorStefan Huber <shuber2@gmx.at>
Sat, 10 Nov 2012 19:21:48 +0000 (20:21 +0100)
committerStefan Huber <shuber2@gmx.at>
Sat, 10 Nov 2012 19:21:48 +0000 (20:21 +0100)
Otherwise cpu load increases significantly as inotifywait terminates
immediately.

nsd/nsd-dynipwatch

index bfdb8407bad273f34f3cf78b7d3e5038be28a69d..bd4b1449ff78df362c9692967412e308831dfbcd 100755 (executable)
@@ -48,6 +48,7 @@ function setSerialInZonefile # <zonefile> <serial>
 
 function run()
 {
+       touch ${watchfile}
        while true; do
                inotifywait -q -t 30 -e close_write "${watchfile}"  > /dev/null
                ret=$?