Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions build/docker/docker_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -319,16 +319,14 @@ for target in "/staging/var/lib/crowdsec/data"/*; do
done

# Check and prestage /etc/crowdsec
if [ ! -e "/etc/crowdsec/local_api_credentials.yaml" ] && [ ! -e "/etc/crowdsec/config.yaml" ]; then
echo "Populating configuration directory..."
# don't overwrite existing configuration files, which may come
# from bind-mount or even be read-only (configmaps)
if [ -e /staging/etc/crowdsec ]; then
mkdir -p /etc/crowdsec/
# if you change this, check that it still works
# under alpine and k8s, with and without tls
rsync -av --ignore-existing /staging/etc/crowdsec/* /etc/crowdsec
fi
# don't overwrite existing configuration files, which may come
# from bind-mount or even be read-only (configmaps)
if [ -e /staging/etc/crowdsec ]; then
echo "Populating missing config files..."
mkdir -p /etc/crowdsec/
# if you change this, check that it still works
# under alpine and k8s, with and without tls
rsync -av --ignore-existing /staging/etc/crowdsec/* /etc/crowdsec
fi

# do this as soon as we have a config.yaml, to avoid useless warnings
Expand Down
Loading