Skip to content

Commit

Permalink
Creating default attribute for ZMMAILBOX
Browse files Browse the repository at this point in the history
  • Loading branch information
lucascbeyeler committed Feb 6, 2021
1 parent b75fe5e commit 9cc24e1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions project/lib/bash/MiscAction.sh
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,11 @@ function validate_config(){
logger -i -p local7.warn "Zmbackup: EMAIL_NOTIFY not informed - setting as [email protected] instead."
fi

if [ -z "$ZMMAILBOX" ]; then
ZMMAILBOX=$(whereis zmmailbox | cut -d" " -f2)
logger -i -p local7.warn "Zmbackup: ZMMAILBOX not defined informed - setting as $ZMMAILBOX instead"
fi

if [ -z "$MAX_PARALLEL_PROCESS" ]; then
MAX_PARALLEL_PROCESS="1"
logger -i -p local7.warn "Zmbackup: MAX_PARALLEL_PROCESS not informed - disabling."
Expand Down
2 changes: 1 addition & 1 deletion project/lib/bash/ParallelAction.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function mailbox_backup()
fi
$ZMMAILBOX -z -m "$1" getRestURL --output "$TEMPDIR"/"$1".tgz "/?fmt=tgz&resolve=skip$AFTER" > "$TEMP_CLI_OUTPUT" 2>&1
BASHERRCODE=$?
if [[ $BASHERRCODE -eq 0 || "$ERR" == *"204 No data found"* ]]; then
if [[ $BASHERRCODE -eq 0 ]]; then
if [[ -s $TEMPDIR/$1.tgz ]]; then
logger -i -p local7.info "Zmbackup: Mailbox - Backup for account $1 finished."
else
Expand Down

0 comments on commit 9cc24e1

Please sign in to comment.