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
暂无评论