Skip to content

Commit

Permalink
Cronjob remove fails due to [[ (#1818)
Browse files Browse the repository at this point in the history
* Fix

* Fix
  • Loading branch information
LaurenceJJones authored Oct 17, 2022
1 parent 2b7e3ff commit 33383fa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion debian/postrm
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion rpm/SPECS/crowdsec.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 33383fa

Please sign in to comment.