wownero/external/unbound/contrib/warmup.sh

151 lines
2.1 KiB
Bash
Raw Normal View History

2014-10-05 15:44:31 -06:00
#!/bin/sh
# --------------------------------------------------------------
2015-04-02 03:16:18 -06:00
# -- Warm up DNS cache script by your own MRU domains or from
# -- file when it specified as script argument.
2014-10-05 15:44:31 -06:00
# --
2015-04-02 03:16:18 -06:00
# -- Version 1.1
2014-10-05 15:44:31 -06:00
# -- By Yuri Voinov (c) 2014
# --------------------------------------------------------------
2015-04-02 03:16:18 -06:00
# Default DNS host address
address="127.0.0.1"
cat=`which cat`
2014-10-05 15:44:31 -06:00
dig=`which dig`
2015-04-02 03:16:18 -06:00
if [ -z "$1" ]; then
2014-10-05 15:44:31 -06:00
echo "Warming up cache by MRU domains..."
2015-04-02 03:16:18 -06:00
$dig -f - @$address >/dev/null 2>&1 <<EOT
2gis.ru
admir.kz
adobe.com
2014-10-05 15:44:31 -06:00
agent.mail.ru
2015-04-02 03:16:18 -06:00
aimp.ru
akamai.com
akamai.net
almaty.tele2.kz
aol.com
apple.com
arin.com
2014-10-05 15:44:31 -06:00
artlebedev.ru
2015-04-02 03:16:18 -06:00
auto.mail.ru
beeline.kz
bing.com
2014-10-05 15:44:31 -06:00
blogspot.com
2015-04-02 03:16:18 -06:00
clamav.net
comodo.com
dnscrypt.org
drive.google.com
drive.mail.ru
facebook.com
2014-10-05 15:44:31 -06:00
farmanager.com
2015-04-02 03:16:18 -06:00
fb.com
firefox.com
2014-10-05 15:44:31 -06:00
forum.farmanager.com
2015-04-02 03:16:18 -06:00
gazeta.ru
getsharex.com
gismeteo.ru
google.com
google.kz
google.ru
googlevideo.com
goto.kz
iana.org
icq.com
imap.mail.ru
instagram.com
instagram.com
intel.com
irr.kz
java.com
kaspersky.com
kaspersky.ru
kcell.kz
krisha.kz
lady.mail.ru
lenta.ru
libreoffice.org
linkedin.com
livejournal.com
mail.google.com
mail.ru
microsoft.com
mozilla.org
mra.mail.ru
munin-monitoring.org
my.mail.ru
news.bbcimg.co.uk
news.mail.ru
newsimg.bbc.net.uk
nvidia.com
odnoklassniki.ru
ok.ru
opencsw.org
opendns.com
opendns.org
opennet.ru
opera.com
oracle.com
peerbet.ru
piriform.com
2014-10-05 15:44:31 -06:00
plugring.farmanager.com
2015-04-02 03:16:18 -06:00
privoxy.org
qip.ru
raidcall.com
rambler.ru
reddit.com
ru.wikipedia.org
shallalist.de
skype.com
snob.ru
squid-cache.org
squidclamav.darold.net
squidguard.org
ssl.comodo.com
ssl.verisign.com
2014-10-05 15:44:31 -06:00
symantec.com
symantecliveupdate.com
2015-04-02 03:16:18 -06:00
tele2.kz
tengrinews.kz
thunderbird.com
2014-10-05 15:44:31 -06:00
torproject.org
2015-04-02 03:16:18 -06:00
torstatus.blutmagie.de
translate.google.com
2014-10-05 15:44:31 -06:00
unbound.net
2015-04-02 03:16:18 -06:00
verisign.com
vk.com
vk.me
vk.ru
vkontakte.com
vkontakte.ru
2014-10-05 15:44:31 -06:00
vlc.org
2015-04-02 03:16:18 -06:00
watsapp.net
weather.mail.ru
2014-10-05 15:44:31 -06:00
windowsupdate.com
2015-04-02 03:16:18 -06:00
www.baidu.com
2014-10-05 15:44:31 -06:00
www.bbc.co.uk
2015-04-02 03:16:18 -06:00
www.internic.net
www.opennet.ru
www.topgear.com
ya.ru
yahoo.com
yandex.com
yandex.ru
youtube.com
ytimg.com
2014-10-05 15:44:31 -06:00
EOT
2015-04-02 03:16:18 -06:00
else
echo "Warming up cache from $1 file..."
$cat $1 | $dig -f - @$address >/dev/null 2>&1
fi
2014-10-05 15:44:31 -06:00
echo "Done."
echo "Saving cache..."
2015-04-02 03:16:18 -06:00
script=`which unbound_cache.sh`
[ -f "$script" ] && $script -s
2014-10-05 15:44:31 -06:00
echo "Done."
exit 0