From 4b564df4c0630ef8c5ab3ddcf140b33ddcc157a4 Mon Sep 17 00:00:00 2001 From: Jakob Olsson Date: Fri, 22 Jan 2021 11:26:38 +0100 Subject: [PATCH] map-agent: init.d: don't start if enabled is explicitly set to 0 --- map-agent/files/etc/init.d/mapagent | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/map-agent/files/etc/init.d/mapagent b/map-agent/files/etc/init.d/mapagent index deca28bdb..d92e058fd 100755 --- a/map-agent/files/etc/init.d/mapagent +++ b/map-agent/files/etc/init.d/mapagent @@ -6,6 +6,12 @@ STOP=20 USE_PROCD=1 start_service() { + config_load "mapagent" + + local enabled + config_get_bool enabled agent enabled 1 + [ "$enabled" -eq 0 ] && return 1 + procd_open_instance procd_set_param command "/usr/sbin/mapagent" "-d" procd_set_param respawn