From bf931f1fde54a4cb4f143ec79e199c0b8b86b0ad Mon Sep 17 00:00:00 2001 From: Thomas Anderson <127358482+zc-devs@users.noreply.github.com> Date: Mon, 23 Sep 2024 21:39:55 +0300 Subject: [PATCH] Fixed hub_update and exit LAPI and Agent are disabled --- docker/docker_start.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docker/docker_start.sh b/docker/docker_start.sh index fb87c1eff9b..18bbb50e9c9 100755 --- a/docker/docker_start.sh +++ b/docker/docker_start.sh @@ -80,6 +80,7 @@ is_mounted() { } run_hub_update_if_from_volume() { + isfalse "$NO_HUB_UPGRADE" || return 0 if is_mounted "/etc/crowdsec/hub/.index.json"; then echo "Running hub update" run_hub_update @@ -359,6 +360,11 @@ fi conf_set_if "$PLUGIN_DIR" '.config_paths.plugin_dir = strenv(PLUGIN_DIR)' +if istrue "$DISABLE_LOCAL_API" && istrue "$DISABLE_AGENT"; then + echo "Skipping crowdsec run, Local API and Agent are disabled" + exit 0 +fi + ## Install hub items run_hub_update_if_from_volume || true