diff --git a/debian/postrm b/debian/postrm index 1e1a4d5c3..9e89bd730 100644 --- a/debian/postrm +++ b/debian/postrm @@ -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 diff --git a/rpm/SPECS/crowdsec.spec b/rpm/SPECS/crowdsec.spec index 618c9124d..fc6b755f8 100644 --- a/rpm/SPECS/crowdsec.spec +++ b/rpm/SPECS/crowdsec.spec @@ -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