mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
dectmngr: cosmetic changes in init script
This commit is contained in:
parent
964cff4e75
commit
9a3777dde9
1 changed files with 10 additions and 8 deletions
|
|
@ -19,7 +19,7 @@ stop_and_wait_dectmngr() {
|
|||
|
||||
pidof $NAME && sleep 2 # wait for the process to stop gracefully
|
||||
while pidof $NAME; do
|
||||
killall -q -9 $NAME
|
||||
killall -q -9 $NAME
|
||||
sleep 1
|
||||
done
|
||||
}
|
||||
|
|
@ -51,18 +51,22 @@ start_service() {
|
|||
config_get log_dect_cmbs global log_dect_cmbs syslog
|
||||
|
||||
procd_open_instance
|
||||
if [ "$log_dect_cmbs" = "none" ]; then
|
||||
case "$log_dect_cmbs" in
|
||||
none)
|
||||
echo "Starting dectmngr with cmbs logging disabled"
|
||||
procd_set_param command $PROG -comname ttyH0 $opt_ext
|
||||
rm -f $LOG_PATH/*
|
||||
elif [ "$log_dect_cmbs" = "file" ]; then
|
||||
;;
|
||||
file)
|
||||
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
|
||||
;;
|
||||
esac
|
||||
|
||||
procd_set_param respawn 6 2 3
|
||||
procd_set_param term_timeout 20
|
||||
|
|
@ -81,8 +85,7 @@ reload_service() {
|
|||
ubus call dect reload
|
||||
}
|
||||
|
||||
service_triggers()
|
||||
{
|
||||
service_triggers() {
|
||||
procd_add_config_trigger "config.change" "asterisk" /etc/init.d/dectmngr restart
|
||||
procd_add_config_trigger "config.change" "dect" /etc/init.d/dectmngr reload
|
||||
}
|
||||
|
|
@ -97,4 +100,3 @@ boot() {
|
|||
[ ! -d $DB_PATH ] && mkdir -p $DB_PATH
|
||||
start
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue