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
|
|
|
|
|
|
|
/usr/bin/cscli --error hub update
|
|
|
|
|
|
|
|
upgraded=$(/usr/bin/cscli --error hub upgrade)
|
|
|
|
if [ -n "$upgraded" ]; then
|
2022-11-04 13:54:03 +00:00
|
|
|
# splay initial metrics push
|
|
|
|
sleep $(seq 1 90 | shuf -n 1)
|
2022-10-28 11:55:59 +00:00
|
|
|
systemctl reload crowdsec
|
|
|
|
fi
|
|
|
|
|
2022-10-20 11:59:39 +00:00
|
|
|
exit 0
|