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 <sebastian_ml@gmx.net>
This commit is contained in:
parent
a3767c5f00
commit
76b09155bc
2 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
Loading…
Reference in a new issue