Automatically enable the online hub
authorCyril Brulebois <cyril@debamax.com>
Mon, 1 Mar 2021 20:40:04 +0000 (20:40 +0000)
committerCyril Brulebois <cyril@debamax.com>
Sun, 14 Jul 2024 02:35:08 +0000 (04:35 +0200)
commitceaa4d01b32603fccaadfae5c24ad8cfbd517459
tree75d435a0888fd076e5ebc487488cab92c49e4030
parentc8f64379c64eda404e4f059e4b7805a4888fa85a
Automatically enable the online hub

By default, crowdsec comes with an offline copy of the hub (see
README.Debian). When running `cscli hub update`, ensure switching from
this offline copy to the online hub.

To ensure cscli doesn't disable anything that was configured (due to
symlinks from /etc/crowdsec becoming dangling all of a sudden), copy the
offline hub in the live directory (/var/lib/crowdsec/hub), and let
further operations (`cscli hub upgrade`, or `cscli <type> install`)
update the live directory as required.

Signed-off-by: Cyril Brulebois <cyril@debamax.com>
Gbp-Pq: Name 0007-automatically-enable-online-hub.patch
cmd/crowdsec-cli/hub.go