summaryrefslogtreecommitdiff
path: root/multimedia/tvheadend
diff options
context:
space:
mode:
authorMarius Dinu <m95d+git@psihoexpert.ro>2022-02-18 22:50:02 +0200
committerRosen Penev <rosenp@gmail.com>2022-02-23 17:23:48 -0800
commit95cbfe893b259433ec06f5a22bac7c047d1db517 (patch)
treec16130fe19a47127e8146337dda7779233b03ef4 /multimedia/tvheadend
parentb31611b1e7609fe2cb3c55ad744128538eb0922e (diff)
tvheadend: bind to LAN IP by default
If config parameter is not set, tvheadend will bind to LAN IP address by default. Fixes issue #16500 without requiring user modifications to config file. It's also more secure if firewall becomes disabled. Signed-off-by: Marius Dinu <m95d+git@psihoexpert.ro>
Diffstat (limited to 'multimedia/tvheadend')
-rw-r--r--multimedia/tvheadend/files/tvheadend.config2
-rw-r--r--multimedia/tvheadend/files/tvheadend.init1
2 files changed, 3 insertions, 0 deletions
diff --git a/multimedia/tvheadend/files/tvheadend.config b/multimedia/tvheadend/files/tvheadend.config
index 62c139de5..4862d0159 100644
--- a/multimedia/tvheadend/files/tvheadend.config
+++ b/multimedia/tvheadend/files/tvheadend.config
@@ -5,6 +5,8 @@
config tvheadend server
option ipv6 '1'
+ # If bindaddr is not set, it will default to LAN IP address (uci get network.lan.ipaddr).
+ # To bind all interfaces, set it to "0.0.0.0".
# option bindaddr '0.0.0.0'
# option http_port '9981'
# option http_root '/tvheadend'
diff --git a/multimedia/tvheadend/files/tvheadend.init b/multimedia/tvheadend/files/tvheadend.init
index a400f1297..770d6a968 100644
--- a/multimedia/tvheadend/files/tvheadend.init
+++ b/multimedia/tvheadend/files/tvheadend.init
@@ -62,6 +62,7 @@ load_uci_config() {
config_get_bool ipv6 server ipv6 0
[ "$ipv6" -eq 1 ] && procd_append_param command --ipv6
config_get bindaddr server bindaddr
+ [ -z "$bindaddr" ] && bindaddr=$(uci get network.lan.ipaddr)
[ -n "$bindaddr" ] && procd_append_param command --bindaddr "$bindaddr"
config_get http_port server http_port
[ -n "$http_port" ] && procd_append_param command --http_port "$http_port"