]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
util: dovecot-sysreport: Fix bug in perl existence check
authorSiavash Tavakoli <siavash.tavakoli@open-xchange.com>
Tue, 18 Feb 2020 13:24:38 +0000 (15:24 +0200)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Wed, 19 Feb 2020 09:14:41 +0000 (11:14 +0200)
Also use "[[" command to be consistent with rest of the script.

src/util/dovecot-sysreport

index 7fb2c105d16d5735be8d2f936b30ff78d8848fbe..d0d6fe79ccc30b7fe0928f20281b16122d2427b4 100755 (executable)
@@ -137,7 +137,7 @@ f = open('$SRTEMP/conf$cf', "w")
 f.write(hidden)
 f.close()
 HEREDOC
-        elif ! [ -x "$(command -v perl)" ]; then
+        elif [[ -x "$(command -v perl)" ]]; then
           perl -pe 's/(?<!no)((?:password|key|nonce|dnpass)\s*=\s*).*?(?=$|\s)/\1#hidden/g' \
             $cf > $SRTEMP/conf$cf
         else