From: Stefan Huber Date: Sat, 10 Nov 2012 19:21:48 +0000 (+0100) Subject: nsd-dynipwatch: touch watchfile before inotify'ing X-Git-Url: https://git.sthu.org/?p=shutils.git;a=commitdiff_plain;h=c4070818c6c1b2fe14edf739ed79d088a835caab nsd-dynipwatch: touch watchfile before inotify'ing Otherwise cpu load increases significantly as inotifywait terminates immediately. --- diff --git a/nsd/nsd-dynipwatch b/nsd/nsd-dynipwatch index bfdb840..bd4b144 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=$?