更新 files/miniupnpd.init
Signed-off-by: zhao <zj18139624826@gmail.com>
This commit is contained in:
parent
23bd3c656e
commit
3e88a122bc
@ -63,7 +63,7 @@ upnpd() {
|
||||
local use_stun stun_host stun_port uuid notify_interval presentation_url
|
||||
local upnp_lease_file clean_ruleset_threshold clean_ruleset_interval
|
||||
local ipv6_disable
|
||||
local force_forwarding
|
||||
local ext_allow_private_ipv4
|
||||
|
||||
local enabled
|
||||
config_get_bool enabled config enabled 1
|
||||
@ -91,7 +91,7 @@ upnpd() {
|
||||
config_get clean_ruleset_threshold config clean_ruleset_threshold
|
||||
config_get clean_ruleset_interval config clean_ruleset_interval
|
||||
config_get ipv6_disable config ipv6_disable 0
|
||||
config_get force_forwarding config force_forwarding 0
|
||||
config_get ext_allow_private_ipv4 config ext_allow_private_ipv4 0
|
||||
|
||||
local conf ifname ifname6
|
||||
|
||||
@ -144,7 +144,7 @@ upnpd() {
|
||||
upnpd_write_bool igdv1 0 force_igd_desc_v1
|
||||
upnpd_write_bool use_stun 0 ext_perform_stun
|
||||
upnpd_write_bool ipv6_disable $ipv6_disable
|
||||
upnpd_write_bool force_forwarding $force_forwarding
|
||||
upnpd_write_bool ext_allow_private_ipv4 $ext_allow_private_ipv4
|
||||
|
||||
[ "$use_stun" -eq 0 ] || {
|
||||
[ -n "$stun_host" ] && echo "ext_stun_host=$stun_host"
|
||||
@ -220,8 +220,10 @@ stop_service() {
|
||||
}
|
||||
|
||||
start_service() {
|
||||
if [ -z "$(uci -q get upnpd.config.presentation_url)" ]; then
|
||||
uci set upnpd.config.presentation_url="http://$(uci -q get network.lan.ipaddr)/"
|
||||
uci commit upnpd
|
||||
fi
|
||||
config_load "upnpd"
|
||||
config_foreach upnpd "upnpd"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user