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