merge together with dectmngr feeds update

This commit is contained in:
Wenpeng Song 2021-12-07 10:13:46 +01:00 committed by Yalu Zhang
parent 499709e2df
commit 7add2a163d
2 changed files with 10 additions and 5 deletions

View file

@ -1,2 +1,2 @@
config dect 'global'
option log_dect_cmbs '0'
option log_dect_cmbs 'syslog'

View file

@ -42,17 +42,22 @@ start_service() {
opt_ext="$opt_ext -model $model_id"
config_load dect
config_get_bool log_dect_cmbs global log_dect_cmbs 0
config_get log_dect_cmbs global log_dect_cmbs syslog
procd_open_instance
if [ $log_dect_cmbs -eq 0 ]; then
if [ "$log_dect_cmbs" = "none" ]; then
echo "Starting dectmngr with cmbs logging disabled"
procd_set_param command $PROG -comname ttyH0 $opt_ext
rm -f $LOG_PATH/*
else
echo "Starting dectmngr with cmbs logging enabled"
elif [ "$log_dect_cmbs" = "file" ]; then
echo "Starting dectmngr with cmbs logging enabled to file"
procd_set_param command $PROG -comname ttyH0 -log $LOG_PATH/dect-cmbs.log $opt_ext
else
echo "Starting dectmngr with cmbs logging enabled to syslog"
procd_set_param command $PROG -comname ttyH0 -syslog $opt_ext
rm -f $LOG_PATH/*
fi
procd_set_param respawn 6 2 3
procd_set_param term_timeout 20
procd_set_param triggers asterisk