From 76b09155bc682bb9fd279aa27efa78fa61730684 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Mon, 5 Nov 2018 20:43:25 +0100 Subject: [PATCH] rtpproxy: add uci log switch Add log_level option to uci config. Paired with the comment it makes setting the log level easier when no man page is around. Signed-off-by: Sebastian Kemper --- net/rtpproxy/files/rtpproxy.config | 2 ++ net/rtpproxy/files/rtpproxy.init | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/net/rtpproxy/files/rtpproxy.config b/net/rtpproxy/files/rtpproxy.config index 2350c11..760a3c3 100644 --- a/net/rtpproxy/files/rtpproxy.config +++ b/net/rtpproxy/files/rtpproxy.config @@ -6,11 +6,13 @@ config instance 'site1' option ipaddr '127.0.0.1' # IPv4 address option ip6addr '2001:0db8:0000:0000:0000:0000:1428:57ab' # IPv6 address option user 'nobody' # userid to run rtpproxy instance from + option log_level 'INFO' # DBUG, INFO, WARN, ERR or CRIT option opts '' # additional options for rtpproxy instance config instance 'site2' option socket 'udp:127.0.0.1:7724' option ipaddr '192.168.1.1' + option log_level 'DBUG' config rtpproxy 'hotplug' #option interface 'wan' # uncomment to enable hotplug diff --git a/net/rtpproxy/files/rtpproxy.init b/net/rtpproxy/files/rtpproxy.init index 32c2940..ac93721 100644 --- a/net/rtpproxy/files/rtpproxy.init +++ b/net/rtpproxy/files/rtpproxy.init @@ -52,18 +52,20 @@ check_special_param() { handle_instance() { local site="$1" - local socket opts ipaddr ip6addr rtpproxy_options + local socket opts ipaddr ip6addr rtpproxy_options log_level config_get socket "$site" socket config_get opts "$site" opts config_get ipaddr "$site" ipaddr config_get ip6addr "$site" ip6addr config_get user "$site" user + config_get log_level "$site" log_level check_param "-s" "$socket" check_param "-l" "$ipaddr" check_param "-6" "$ip6addr" check_param "-u" "$user" "nobody" + check_param "-d" "$log_level" "DBUG" check_special_param "$opts" -- 2.30.2