mirror of
https://github.com/crowdsecurity/crowdsec.git
synced 2025-05-10 20:05:55 +02:00
15 lines
281 B
Bash
15 lines
281 B
Bash
#!/bin/sh
|
|
|
|
test -x /usr/bin/cscli || exit 0
|
|
|
|
# splay hub upgrade and crowdsec reload
|
|
sleep "$(seq 1 300 | shuf -n 1)"
|
|
|
|
/usr/bin/cscli --error hub update >/dev/null
|
|
|
|
upgraded=$(/usr/bin/cscli --error hub upgrade)
|
|
if [ -n "$upgraded" ]; then
|
|
systemctl reload crowdsec
|
|
fi
|
|
|
|
exit 0
|