crowdsec update automation
After updating crowdsec I’ve noticed, that there are quite a few manual tasks to finalize the update process.
Obvious solution to this is to automate the process.
Here is what I came up with:
#!/bin/bash
#Update hub
cscli hub update
for DATA in $(cscli hub list -o raw|grep update-available|cut -f 6 -d ","|sort -u)
do
echo $DATA
cscli $DATA upgrade --all
systemctl reload crowdsec
done
Your comments and improvements are more than welcome.
Leave a Reply
You must be logged in to post a comment.