]> Frank Brehm's Git Trees - pixelpark/ldap-migration.git/commitdiff
Fixing debug output in migrating sieve
authorFrank Brehm <frank@brehm-online.com>
Tue, 15 Feb 2022 10:48:58 +0000 (11:48 +0100)
committerFrank Brehm <frank@brehm-online.com>
Tue, 15 Feb 2022 10:48:58 +0000 (11:48 +0100)
migrate-sieve

index b1e92772bd4ddcb63e52a7e1e23e015e58f7c7fc..ceaf0d04a00e6ba626c65c345297012ff7cd6b67 100755 (executable)
@@ -7,7 +7,7 @@ VERBOSE="n"
 DEBUG="n"
 QUIET='n'
 SIMULATE='n'
-FORCE="y"
+FORCE="n"
 
 VERSION="4.1"
 
@@ -632,7 +632,11 @@ migrate_entry() {
     info "Compiling '${CYAN}${dovecot_sieve_file}${NORMAL}' ..."
     debug "Executing: sievec \"${dovecot_sieve_file}\" || true"
     if [[ "${SIMULATE}" != "y" ]] ; then
-        sievec "${dovecot_sieve_file}" 2>&1 | grep -viw debug || true
+        if [[ "${VERBOSE}" == "y" ]] ; then
+            sievec "${dovecot_sieve_file}" || true
+        else
+            sievec "${dovecot_sieve_file}" 2>&1 | grep -viw debug || true
+        fi
     fi
     if [[ -f "${compiled_sieve}" ]] ; then
         CHOWN "${VMAIL_USER}:${VMAIL_GROUP}" "${compiled_sieve}"