From 8630e9754c1dafdae7cf3c15a70424627cf3a399 Mon Sep 17 00:00:00 2001 From: Lucas Costa Beyeler Date: Tue, 8 Dec 2020 14:11:39 +0000 Subject: [PATCH] Rename ldif to ldiff --- README.md | 2 +- project/lib/bash/NotifyAction.sh | 2 +- project/lib/bash/ParallelAction.sh | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 91d8c72..0e5d7cd 100644 --- a/README.md +++ b/README.md @@ -117,7 +117,7 @@ Restore Backup Options: -a, --account : Execute a backup of only a set of accounts, comma separated ``` -To execute a full backup routine, which include by default the mailbox and the ldif, just run the script with the option **-f** or **--full**. Depending of the ammount of accounts or the number of proccess you set in the option **MAX_PARALLEL_PROCESS**, this will take sometime before conclude. +To execute a full backup routine, which include by default the mailbox and the ldiff, just run the script with the option **-f** or **--full**. Depending of the ammount of accounts or the number of proccess you set in the option **MAX_PARALLEL_PROCESS**, this will take sometime before conclude. ``` $ zmbackup -f diff --git a/project/lib/bash/NotifyAction.sh b/project/lib/bash/NotifyAction.sh index 73d400c..aa47ce5 100644 --- a/project/lib/bash/NotifyAction.sh +++ b/project/lib/bash/NotifyAction.sh @@ -51,7 +51,7 @@ function notify_finish() if [[ "$1" == "mbox"* ]]; then QTDE=$(find "$WORKDIR"/"$1"/*.tgz | wc -l) else - QTDE=$(find "$WORKDIR"/"$1"/*.ldif | wc -l) + QTDE=$(find "$WORKDIR"/"$1"/*.ldiff | wc -l) fi else SIZE=0 diff --git a/project/lib/bash/ParallelAction.sh b/project/lib/bash/ParallelAction.sh index 2e298b9..19a5c7a 100644 --- a/project/lib/bash/ParallelAction.sh +++ b/project/lib/bash/ParallelAction.sh @@ -17,7 +17,7 @@ function ldap_backup() { TEMP_CLI_OUTPUT=$(mktemp) ldapsearch -Z -x -H "$LDAPSERVER" -D "$LDAPADMIN" -w "$LDAPPASS" -b '' \ - -LLL "(&(|(mail=$1)(uid=$1))$2)" > "$TEMPDIR"/"$1".ldif 2> "$TEMP_CLI_OUTPUT" + -LLL "(&(|(mail=$1)(uid=$1))$2)" > "$TEMPDIR"/"$1".ldiff 2> "$TEMP_CLI_OUTPUT" BASHERRCODE=$? if [[ $BASHERRCODE -eq 0 ]]; then logger -i -p local7.info "Zmbackup: LDAP - Backup for account $1 finished." @@ -80,9 +80,9 @@ function mailbox_backup() function ldap_restore() { ldapdelete -r -x -H "$LDAPSERVER" -D "$LDAPADMIN" -c -w "$LDAPPASS" \ - "$(grep ^dn: "$WORKDIR"/"$1"/"$2".ldif | awk 'print $2')" > /dev/null 2>&1 + "$(grep ^dn: "$WORKDIR"/"$1"/"$2".ldiff | awk 'print $2')" > /dev/null 2>&1 ERR=$( (ldapadd -x -H "$LDAPSERVER" -D "$LDAPADMIN" \ - -c -w "$LDAPPASS" -f "$WORKDIR"/"$1"/"$2".ldif) 2>&1) + -c -w "$LDAPPASS" -f "$WORKDIR"/"$1"/"$2".ldiff) 2>&1) BASHERRCODE=$? if ! [[ $BASHERRCODE -eq 0 ]]; then printf "\nError during the restore process for account %s. Error message below:" "$2"