tunneldigger: add group option to UCI config
authorMatthias Schiffer <mschiffer@universe-factory.net>
Tue, 26 Sep 2023 16:58:11 +0000 (18:58 +0200)
committerMatthias Schiffer <mschiffer@universe-factory.net>
Wed, 27 Sep 2023 16:16:49 +0000 (18:16 +0200)
The group can be used for policy routing and similar purposes.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
(cherry picked from commit 21dd77f6c48f5c59beee5dccc4aee9a2afa3e137)

net/tunneldigger/files/tunneldigger.init

index ea37751d5d024be7975ed66f9fa173a5e399bde3..bacaace8168ecddb8a82bff731df82d75830edbd 100644 (file)
@@ -21,6 +21,7 @@ parse_broker() {
        config_get limit_bw_down "$section" limit_bw_down
        config_get hook_script "$section" hook_script
        config_get bind_interface "$section" bind_interface
+       config_get group "$section" group
        
        [ $enabled -eq 0 ] && return
 
@@ -53,6 +54,7 @@ parse_broker() {
        procd_append_param command -i "${interface}"
        procd_append_param command -t "${tunnel_id}"
        procd_append_param command ${broker_opts}
+       [ -n "$group" ] && procd_set_param group "$group"
        procd_set_param stdout 1
        procd_set_param stderr 1
        procd_set_param respawn