mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
map-controller: add external trigger logic to init.d
This commit is contained in:
parent
4b04b8445f
commit
0097bc5d89
1 changed files with 13 additions and 0 deletions
|
|
@ -5,8 +5,16 @@ STOP=20
|
|||
|
||||
USE_PROCD=1
|
||||
|
||||
handle_controller_select() {
|
||||
local section="$1"
|
||||
|
||||
config_get_bool local_ctrl "$section" local 0
|
||||
return 1
|
||||
}
|
||||
|
||||
start_service() {
|
||||
local enabled
|
||||
local local_ctrl=0
|
||||
|
||||
config_load "mapcontroller"
|
||||
config_get_bool enabled controller enabled 1
|
||||
|
|
@ -14,6 +22,11 @@ start_service() {
|
|||
|
||||
procd_open_instance
|
||||
procd_set_param command "/usr/sbin/mapcontroller" "-d"
|
||||
|
||||
config_load "mapagent"
|
||||
config_foreach handle_controller_select controller_select
|
||||
[ "$local_ctrl" -eq 0 ] && procd_append_param command "-w"
|
||||
|
||||
procd_set_param respawn
|
||||
# procd_set_param stdout 1
|
||||
# procd_set_param stderr 1
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue