#!/bin/sh # -------------------------------------------------------------- # -- Warm up DNS cache script by your own MRU domains or from # -- file when it specified as script argument. # -- # -- Version 1.1 # -- By Yuri Voinov (c) 2014 # -------------------------------------------------------------- # Default DNS host address setglobal address = '"127.0.0.1'" setglobal cat = $[which cat] setglobal dig = $[which dig] if test -z $1 { echo "Warming up cache by MRU domains..." $dig -f - @$address >/dev/null 2>&1 </dev/null 2>&1 } echo "Done." echo "Saving cache..." setglobal script = $[which unbound_cache.sh] test -f $script && $script -s echo "Done." exit 0