luci: fix status section not working issue and add some options
This commit is contained in:
@@ -260,6 +260,8 @@ load_service()
|
||||
{
|
||||
local section="$1"
|
||||
args=""
|
||||
dnsmase_lease_file="$(uci get dhcp.@dnsmasq[0].leasefile 2>/dev/null)"
|
||||
qtype_soa_list=""
|
||||
|
||||
mkdir -p $SMARTDNS_VAR_CONF_DIR
|
||||
rm -f $SMARTDNS_CONF_TMP
|
||||
@@ -302,6 +304,15 @@ load_service()
|
||||
config_get cache_size "$section" "cache_size" ""
|
||||
[ -z "$cache_size" ] || conf_append "cache-size" "$cache_size"
|
||||
|
||||
config_get resolve_local_hostnames "$section" "resolve_local_hostnames" "1"
|
||||
[ -z "$resolve_local_hostnames" ] || conf_append "dnsmasq-lease-file" "$dnsmase_lease_file"
|
||||
|
||||
config_get force_aaaa_soa "$section" "force_aaaa_soa" "0"
|
||||
[ "$force_aaaa_soa" = "1" ] && qtype_soa_list="$qtype_soa_list 28"
|
||||
|
||||
config_get force_https_soa "$section" "force_https_soa" "0"
|
||||
[ "$force_https_soa" = "1" ] && qtype_soa_list="$qtype_soa_list 65"
|
||||
|
||||
config_get rr_ttl "$section" "rr_ttl" ""
|
||||
[ -z "$rr_ttl" ] || conf_append "rr-ttl" "$rr_ttl"
|
||||
|
||||
@@ -331,6 +342,8 @@ load_service()
|
||||
config_get old_port "$section" "old_port" "0"
|
||||
config_get old_enabled "$section" "old_enabled" "0"
|
||||
|
||||
[ -z "$qtype_soa_list" ] || conf_append "force-qtype-SOA" "$qtype_soa_list"
|
||||
|
||||
if [ "$old_redirect" != "$redirect" ] || [ "$old_port" != "$SMARTDNS_PORT" ] || [ "$old_enabled" = "1" -a "$enabled" = "0" ]; then
|
||||
[ "$old_redirect" = "none" ] || {
|
||||
[ "$old_port" = "0" ] || clear_iptable "$old_port" "$ipv6_server"
|
||||
|
||||
Reference in New Issue
Block a user