• HOME
  • DOCS
  • WTF
  • TECH
  • LIFE
  • PAGES
    • ARCHIVE
    • TAGS
    • ABOUT
    • FRIENDS
    • RSS
  • TOOLS
    • GEO
    • RANDOM()
    • GOO.GL
    • CSS HEART
Aj's Blog

记录时间溜走的瞬间和折腾过的那些事

DD-WRT Smarthosts配置

2014-05-08  TECH  dd-wrt  smarthosts  

一、DNSMasq附加选项
addn-hosts=/tmp/smarthosts.hosts

二、定时更新
命令 \ 添加为自定义命令

#!/bin/sh
touch /tmp/smarthosts.hosts.tmp
until [ "`cat /tmp/smarthosts.hosts.tmp|grep -c SmartHosts`" != 0 ];do
sleep 15
wget http://smarthosts.googlecode.com/svn/trunk/hosts -O /tmp/smarthosts.hosts.tmp
done
mv /tmp/smarthosts.hosts.tmp /tmp/smarthosts.hosts
stopservice dnsmasq && startservice dnsmasq

三、cron
每2小时执行一次更新,调用自定义命令
0 */2 * * * root /tmp/custom.sh

下一篇:   TP-LINK WDR7500V2 刷 OpenWRT 转 ArcherC7
上一篇:   DD-WRT无线设置详解
暂无评论

Cancel reply