miniupnpd: implement an 'enabled' flag
Add a 'master' miniupnpd service enable flag rather than just relying on rcS.d script existence. This allows the service to be disabled across sysupgrade, similar to minidlna. The service assumes enabled if no 'enabled' config flag is configured for backwards compatibility. Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
This commit is contained in:
parent
c71d752eda
commit
33dc373da9
2 changed files with 6 additions and 1 deletions
|
@ -68,7 +68,11 @@ start() {
|
||||||
local extip port usesysuptime conffile serial_number model_number
|
local extip port usesysuptime conffile serial_number model_number
|
||||||
local uuid notify_interval presentation_url enable_upnp
|
local uuid notify_interval presentation_url enable_upnp
|
||||||
local upnp_lease_file clean_ruleset_threshold clean_ruleset_interval
|
local upnp_lease_file clean_ruleset_threshold clean_ruleset_interval
|
||||||
local ipv6_listening_ip
|
local ipv6_listening_ip enabled
|
||||||
|
|
||||||
|
config_get_bool enabled config enabled 1
|
||||||
|
|
||||||
|
[ "$enabled" -gt 0 ] || return 1
|
||||||
|
|
||||||
config_get extiface config external_iface
|
config_get extiface config external_iface
|
||||||
config_get extzone config external_zone
|
config_get extzone config external_zone
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
config upnpd config
|
config upnpd config
|
||||||
|
option enabled 0
|
||||||
option enable_natpmp 1
|
option enable_natpmp 1
|
||||||
option enable_upnp 1
|
option enable_upnp 1
|
||||||
option secure_mode 1
|
option secure_mode 1
|
||||||
|
|
Loading…
Reference in a new issue