diff options
Diffstat (limited to 'usr/sbin')
-rwxr-xr-x | usr/sbin/update_dns_cache.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/usr/sbin/update_dns_cache.sh b/usr/sbin/update_dns_cache.sh new file mode 100755 index 0000000..49ee231 --- /dev/null +++ b/usr/sbin/update_dns_cache.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +while [ /bin/true ]; do + cd /var/db/dnscache + needsfilterreload=0 + for FILE in *; do + OLDIP=`cat $FILE` + NEWIP=`host $FILE | awk '{ print $4 }'` + if [ "$OLDIP" != "$NEWIP" ]; then + needsfilterreload=1 + fi + done + if [ "$needsfilterreload" -gt 0 ]; then + /etc/rc.filter_configure_sync + fi + sleep 480 +done |