Files
zira-etc/cron.daily/crowdsec
2023-06-12 09:31:52 +03:00

15 lines
263 B
Bash
Executable File

#!/bin/sh
test -x /usr/bin/cscli || exit 0
/usr/bin/cscli --error hub update
upgraded=$(/usr/bin/cscli --error hub upgrade)
if [ -n "$upgraded" ]; then
# splay initial metrics push
sleep $(seq 1 90 | shuf -n 1)
systemctl reload crowdsec
fi
exit 0