mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
updated the init.d script for catv so it gets a bool for enable from config and sends "on/off" to ubus call catv set-enable
This commit is contained in:
parent
dec7322ad1
commit
3f179f17d4
1 changed files with 9 additions and 5 deletions
|
|
@ -10,12 +10,16 @@ USE_PROCD=1
|
|||
|
||||
start_service() {
|
||||
local enable=0
|
||||
local filter=0
|
||||
local filter=0
|
||||
|
||||
config_load catv
|
||||
config_get enable catv enable
|
||||
config_get filter catv filter
|
||||
ubus call catv set-enable "{\"enable\":\"$enable\"}"
|
||||
config_load catv
|
||||
config_get_bool enable catv enable 0
|
||||
config_get filter catv filter
|
||||
if [ $enable -eq 0 ]; then
|
||||
ubus call catv set-enable "{\"enable\":\"off\"}"
|
||||
else
|
||||
ubus call catv set-enable "{\"enable\":\"on\"}"
|
||||
fi
|
||||
ubus call catv set-filter "{\"filter\":\"$filter\"}"
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue