mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
map-controller: only parse for -w flag if mapagent config exists
This commit is contained in:
parent
c2fad5fad2
commit
aa34cd098e
1 changed files with 7 additions and 4 deletions
|
|
@ -14,7 +14,6 @@ handle_controller_select() {
|
|||
|
||||
start_service() {
|
||||
local enabled
|
||||
local local_ctrl=0
|
||||
|
||||
config_load "mapcontroller"
|
||||
config_get_bool enabled controller enabled 1
|
||||
|
|
@ -23,9 +22,13 @@ 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"
|
||||
if [ -f /etc/config/mapagent ]; then
|
||||
local local_ctrl=0
|
||||
|
||||
config_load "mapagent"
|
||||
config_foreach handle_controller_select controller_select
|
||||
[ "$local_ctrl" -eq 0 ] && procd_append_param command "-w"
|
||||
fi
|
||||
|
||||
procd_set_param respawn
|
||||
# procd_set_param stdout 1
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue