2022-10-18 15:11:48 +00:00
|
|
|
#!/bin/sh
|
2022-10-28 11:55:59 +00:00
|
|
|
|
2022-10-20 11:59:39 +00:00
|
|
|
test -x /usr/bin/cscli || exit 0
|
2022-10-28 11:55:59 +00:00
|
|
|
|
2024-03-06 12:42:57 +00:00
|
|
|
# splay hub upgrade and crowdsec reload
|
|
|
|
sleep "$(seq 1 300 | shuf -n 1)"
|
|
|
|
|
2022-10-28 11:55:59 +00:00
|
|
|
/usr/bin/cscli --error hub update
|
|
|
|
|
|
|
|
upgraded=$(/usr/bin/cscli --error hub upgrade)
|
|
|
|
if [ -n "$upgraded" ]; then
|
|
|
|
systemctl reload crowdsec
|
|
|
|
fi
|
|
|
|
|
2022-10-20 11:59:39 +00:00
|
|
|
exit 0
|