Cronjob remove fails due to [[ (#1818)

* Fix

* Fix
This commit is contained in:
Laurence Jones 2022-10-17 17:09:52 +01:00 committed by GitHub
parent 2b7e3ff1e7
commit 33383faf9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

2
debian/postrm vendored
View file

@ -1,7 +1,7 @@
if [ "$1" = "purge" ]; then
find /etc/crowdsec -maxdepth 1 -mindepth 1 | grep -v "bouncer" | xargs rm -rf || echo ""
rm -rf /var/lib/crowdsec
if [[ -d /etc/cron.daily/ ]] && [[ -f /etc/cron.daily/crowdsec-hub ]]; then
if [ -d "/etc/cron.daily/" ] && [ -f "/etc/cron.daily/crowdsec-hub" ]; then
rm /etc/cron.daily/crowdsec-hub
fi
fi

View file

@ -228,7 +228,7 @@ if [ $1 == 0 ]; then
rm -rf /etc/crowdsec/hub
fi
if [[ -d /etc/cron.daily/ ]] && [[ -f /etc/cron.daily/crowdsec-hub ]]; then
if [ -d "/etc/cron.daily/" ] && [ -f "/etc/cron.daily/crowdsec-hub" ]; then
rm /etc/cron.daily/crowdsec-hub
fi