move export user notifications

This commit is contained in:
Asif Bacchus 2019-07-25 12:46:31 -06:00
parent 257667f12a
commit f12aa53e54

View File

@ -385,9 +385,7 @@ printf "${cyan}[%s] -- [INFO] ${yellow}%s${cyan} imported --${norm}\n" \
## create tmp directory and change to it for export operations
printf "${cyan}[%s] -- [INFO] Exporting EML files from piler --${norm}\n" \
"$(stamp)" >> "$logFile"
# create temporary directory to dump files before borg backup
# create temporary directory to dump exported email from piler
if ! exportDir=$( mktemp -d 2>>"$logFile" ); then
exitError 111 "Could not create temporary directory for exported EML files"
fi
@ -403,6 +401,8 @@ printf "${cyan}[%s] -- [INFO] EML files will be temporarily stored in:" \
printf "\n${yellow}%s/${cyan} --${norm}\n" "$exportDir" >> "$logFile"
## export EML from piler
printf "${cyan}[%s] -- [INFO] Exporting EML files from piler --${norm}\n" \
"$(stamp)" >> "$logFile"
if [ "$exportAll" -eq 1 ]; then
if ! pilerexport -A 2>>"$logFile"; then
exitError 115 "There was a problem while exporting EML from piler"