mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
capiagent: start only mapagent or controller exists and enabled
This commit is contained in:
parent
4ebffa9cfb
commit
84a5b3f99f
1 changed files with 16 additions and 7 deletions
|
|
@ -6,6 +6,13 @@ STOP=20
|
|||
USE_PROCD=1
|
||||
|
||||
start_service() {
|
||||
if [ -e "/etc/config/mapagent" -o -e "/etc/config/mapcontroller" ]; then
|
||||
config_load mapagent
|
||||
config_get_bool agent_enabled agent enabled 1
|
||||
config_load mapcontroller
|
||||
config_get_bool controller_enabled controller enabled 1
|
||||
|
||||
if [ $agent_enabled -eq 1 -o $controller_enabled -eq 1 ]; then
|
||||
procd_open_instance
|
||||
procd_set_param command "/usr/sbin/capiagent" "-p 9000"
|
||||
procd_set_param limits core="unlimited"
|
||||
|
|
@ -13,6 +20,8 @@ start_service() {
|
|||
#procd_set_param stdout 1
|
||||
#procd_set_param stderr 1
|
||||
procd_close_instance
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
service_triggers()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue