cscli hub update: option --with-content to keep embedded items in index; use it in docker (#3192)

This commit is contained in:
mmetc 2024-08-27 13:07:05 +02:00 committed by GitHub
parent 27559d6636
commit ec415ed069
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 42 additions and 11 deletions

View file

@ -57,7 +57,7 @@ run_hub_update() {
index_modification_time=$(stat -c %Y /etc/crowdsec/hub/.index.json 2>/dev/null)
# Run cscli hub update if no date or if the index file is older than 24h
if [ -z "$index_modification_time" ] || [ $(( $(date +%s) - index_modification_time )) -gt 86400 ]; then
cscli hub update
cscli hub update --with-content
else
echo "Skipping hub update, index file is recent"
fi