map-agent: init.d: don't start if enabled is explicitly set to 0

This commit is contained in:
Jakob Olsson 2021-01-22 11:26:38 +01:00
parent 5e6580ccf2
commit 4b564df4c0

View file

@ -6,6 +6,12 @@ STOP=20
USE_PROCD=1 USE_PROCD=1
start_service() { start_service() {
config_load "mapagent"
local enabled
config_get_bool enabled agent enabled 1
[ "$enabled" -eq 0 ] && return 1
procd_open_instance procd_open_instance
procd_set_param command "/usr/sbin/mapagent" "-d" procd_set_param command "/usr/sbin/mapagent" "-d"
procd_set_param respawn procd_set_param respawn