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>
Sat, 18 Mar 2023 23:25:07 +0000 (23:25 +0000)
commita07c6f6885bd4eea140af5fec443a68ecb2bfc2b
treeb3b07b90b9cb4fe616dd2142a6c0294ce2677e71
parent84cb5270264da48bb6aa6504139b1f2d75ec5085
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