#!/bin/bash #wdlinux update scripts #http://www.wdlinux.cn grep "forwarders" /www/wdlinux/bind/etc/named.conf >/dev/null 2>&1 if [[ $? == 1 ]];then sed -i "/version /a\ forwarders { 8.8.8.8; };\nforward only;" /www/wdlinux/bind/etc/named.conf sed -i 's/allow-recursion { none; };/allow-recursion { any; };/g' /www/wdlinux/bind/etc/wddns_view.conf sed -i 's/recursion no;/recursion yes;/g' /www/wdlinux/bind/etc/wddns_view.conf /etc/rc.d/init.d/named restart fi