|group|String|nogroup|Local group to run instance under.|
|use_http1|Boolean|0|If set to 1, use HTTP/1 on installations with broken/outdated ```curl``` package. Included for posterity reasons, you will most likely not ever need it on OpenWrt.|
|verbosity|Integer|0|logging verbosity level. fatal = 0, error = 1, warning = 2, info = 3, debug = 4|
-|ipv6_resolvers_only|Boolean|0|If set to 1, Forces IPv6 DNS resolvers instead of IPv4|
+|use_ipv6_resolvers_only|Boolean|0|If set to 1, Forces IPv6 DNS resolvers instead of IPv4|
## Thanks
append_bool "$cfg" 'use_http1' '-x'
config_get verbosity "$cfg" 'verbosity' "0"
+# shellcheck disable=SC2086,SC2154
for i in $(seq 1 $verbosity); do
xappend "-v"
done
- config_get_bool ipv6_resolvers_only "$cfg" 'ipv6_resolvers_only' '0'
- if [ "$ipv6_resolvers_only" == 0 ]; then
+ config_get_bool ipv6_resolvers_only "$cfg" 'use_ipv6_resolvers_only' '0'
+# shellcheck disable=SC2154
+ if [ "$ipv6_resolvers_only" = 0 ]; then
xappend "-4"
fi
;;
esac
- uci -q del_list dhcp."$cfg".server="$address#$port"
- uci -q add_list dhcp."$cfg".server="$address#$port"
+ uci -q del_list "dhcp.$cfg.server=${address}#${port}"
+ uci -q add_list "dhcp.$cfg.server=${address}#${port}"
}
dnsmasq_create_server_backup() {
for i in $(uci -q get "dhcp.$cfg.server"); do
uci -q add_list dhcp."$cfg".doh_backup_server="$i"
if [ "$i" = "${i//127.0.0.1}" ] && [ "$i" = "$(echo "$i" | tr -d /)" ]; then
- uci -q del_list dhcp."$cfg".server="$i"
+ uci -q del_list "dhcp.$cfg.server=$i"
fi
done
}
if uci -q get "dhcp.$cfg.doh_backup_server" >/dev/null; then
uci -q del "dhcp.$cfg.server"
for i in $(uci -q get "dhcp.$cfg.doh_backup_server"); do
- uci -q add_list dhcp."$cfg".server="$i"
+ uci -q add_list "dhcp.$cfg.server=$i"
done
uci -q del "dhcp.$cfg.doh_backup_server"
fi