#!/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 address="127.0.0.1" cat=`which cat` dig=`which dig` if [ -z "$1" ]; then echo "Warming up cache by MRU domains..." $dig -f - @$address >/dev/null 2>&1 </dev/null 2>&1 fi echo "Done." echo "Saving cache..." script=`which unbound_cache.sh` [ -f "$script" ] && $script -s echo "Done." exit 0