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>
Wed, 15 Feb 2023 10:03:10 +0000 (10:03 +0000)
commit149dfb4ee060a246cb805c568ac3a599f57a4858
tree5e38fa201ab9a99dea2038ee1664d641cbb71166
parent0634c52cd82e2e20cd794d3ac842ee3a919e9bc9
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