Explorar o código

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

* Fix

* Fix
Laurence Jones %!s(int64=2) %!d(string=hai) anos
pai
achega
33383faf9e
Modificáronse 2 ficheiros con 2 adicións e 2 borrados
  1. 1 1
      debian/postrm
  2. 1 1
      rpm/SPECS/crowdsec.spec

+ 1 - 1
debian/postrm

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

+ 1 - 1
rpm/SPECS/crowdsec.spec

@@ -228,7 +228,7 @@ if [ $1 == 0 ]; then
     rm -rf /etc/crowdsec/hub
     rm -rf /etc/crowdsec/hub
 fi
 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
     rm /etc/cron.daily/crowdsec-hub
 fi
 fi