move SQL cleanup flag immediately after temp dir
This commit is contained in:
parent
fa82cb2ce6
commit
cabe1d4894
@ -350,6 +350,8 @@ printf "${cyan}[%s] -- [INFO] Dumping SQL databases --${norm}\n" \
|
||||
if ! sqlDumpDir=$( mktemp -d 2>>"$logFile"); then
|
||||
exitError 111 "Could not create temporary directory to dump SQL files"
|
||||
fi
|
||||
# set cleanup flag
|
||||
sqlCopied=1
|
||||
printf "${cyan}[%s] -- [INFO] SQL dump files will be temporarily stored in:" \
|
||||
"$(stamp)" >> "$logFile"
|
||||
printf "\n${yellow}%s/${cyan} --${norm}\n" "$sqlDumpDir" >> "$logFile"
|
||||
@ -375,8 +377,7 @@ if ! mysqldump -h"${sqlServer}" -u"${sqlUser}" -p"${sqlPass}" \
|
||||
fi
|
||||
printf "${ok}[%s] -- [SUCCESS] SQL databases dumped successfully --${norm}\n" \
|
||||
"$(stamp)" >> "$logFile"
|
||||
# set cleanup flag
|
||||
sqlCopied=1
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user