blob: d0a9fe85d3b414a79d34e2fd7250e8edf32abca1 (
plain) (
tree)
|
|
#!/bin/sh
# shellcheck disable=SC2249
case $2 in
"POST-INSTALL")
echo "Updating crowdsec hub data"
if cscli hub update -o human --error; then
cscli hub upgrade -o human --error
else
echo "Failed to update crowdsec hub data."
echo "You can run 'cscli hub update; cscli hub upgrade'"
echo "to update manually, or let the cron job do it for you."
fi
if [ -e /var/run/crowdsec.running ]; then
service crowdsec onestart
rm -f /var/run/crowdsec.running
fi
;;
esac
|