Преглед изворни кода

Cronjob remove fails due to `[[` (#1818)

* Fix

* Fix
Laurence Jones пре 2 година
родитељ
комит
33383faf9e
2 измењених фајлова са 2 додато и 2 уклоњено
  1. 1 1
      debian/postrm
  2. 1 1
      rpm/SPECS/crowdsec.spec

+ 1 - 1
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

+ 1 - 1
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