mirror of
https://github.com/crowdsecurity/crowdsec.git
synced 2025-05-11 12:25:53 +02:00
fix docker image + install whitelists on build (#968)
* fix docker image + install whitelists on build
This commit is contained in:
parent
e929ba16de
commit
ff400c9bca
2 changed files with 4 additions and 4 deletions
|
@ -4,8 +4,8 @@
|
|||
if [ "$DISABLE_AGENT" == "" ] ; then
|
||||
echo "Check if the container has already been started (ignore if agent is disabled)"
|
||||
cscli machines list | grep localhost
|
||||
if [ $? == 1 ]; then
|
||||
cscli lapi register --machine localhost
|
||||
if [ "$?" == 1 ]; then
|
||||
cscli machines add localhost --auto
|
||||
fi
|
||||
if [ "$AGENT_USERNAME" != "" ] && [ "$AGENT_PASSWORD" != "" ] && [ "$LOCAL_API_URL" != "" ] ; then
|
||||
echo "set up lapi credentials for agent"
|
||||
|
@ -46,6 +46,7 @@ fi
|
|||
## Install collections, parsers & scenarios
|
||||
cscli hub update
|
||||
cscli collections upgrade crowdsecurity/linux || true
|
||||
cscli parsers upgrade crowdsecurity/whitelists || true
|
||||
if [ "$COLLECTIONS" != "" ]; then
|
||||
cscli collections install $COLLECTIONS
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue