aboutsummaryrefslogtreecommitdiff
path: root/net/mdns-repeater/files
diff options
context:
space:
mode:
authorAlexander Koenig <alex@lisas.de>2021-10-04 21:40:33 +0200
committerRosen Penev <rosenp@gmail.com>2021-11-04 15:17:00 -0700
commit1589ebcede5b2641ee3daefc483db1dd02eb7f18 (patch)
treea248f93fed105d23e7ca7de5750f774c8a0ff944 /net/mdns-repeater/files
parente7b21be6fad60b447b30414967f413534c62e59d (diff)
mdns-repeater: add package for mdns-repeater
Signed-off-by: Alexander Koenig <alex@lisas.de>
Diffstat (limited to 'net/mdns-repeater/files')
-rwxr-xr-xnet/mdns-repeater/files/mdns-repeater.init35
-rw-r--r--net/mdns-repeater/files/mdns_repeater.conf5
2 files changed, 40 insertions, 0 deletions
diff --git a/net/mdns-repeater/files/mdns-repeater.init b/net/mdns-repeater/files/mdns-repeater.init
new file mode 100755
index 000000000..1814d25ab
--- /dev/null
+++ b/net/mdns-repeater/files/mdns-repeater.init
@@ -0,0 +1,35 @@
+#!/bin/sh /etc/rc.common
+
+START=50
+STOP=50
+
+USE_PROCD=1
+PROG=/usr/sbin/mdns-repeater
+
+start_service() {
+ config_load mdns_repeater
+ local interfaces
+ config_get interfaces main interface
+ procd_open_instance
+ procd_set_param command $PROG -f $interfaces
+ # -f generates a lot of debug output
+ # no forwarding of stderr to logs
+ procd_set_param file /etc/config/mdns_repeater
+ procd_close_instance
+}
+
+reload_service() {
+ restart
+}
+
+interface_trigger() {
+ procd_add_reload_interface_trigger "$1"
+}
+
+service_triggers() {
+ procd_add_reload_trigger "mdns_repeater"
+
+ config_load mdns_repeater
+ config_list_foreach main interface interface_trigger
+}
+
diff --git a/net/mdns-repeater/files/mdns_repeater.conf b/net/mdns-repeater/files/mdns_repeater.conf
new file mode 100644
index 000000000..2c48b3223
--- /dev/null
+++ b/net/mdns-repeater/files/mdns_repeater.conf
@@ -0,0 +1,5 @@
+
+config mdns_repeater 'main'
+ list interface 'br-lan'
+ list interface 'eth0.2'
+