15 lines
270 B
Bash
15 lines
270 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
|
|
|
|
upgraded=$(/usr/bin/cscli --error hub upgrade)
|
|
if [ -n "$upgraded" ]; then
|
|
systemctl reload crowdsec
|
|
fi
|
|
|
|
exit 0
|