add SQL directory to cleanup

This commit is contained in:
Asif Bacchus 2020-05-06 22:57:41 -06:00
parent 0d32aaf40a
commit 8a5a87db12
2 changed files with 12 additions and 18 deletions

View File

@ -1,19 +1,3 @@
{
"bookmarks": [
{
"fsPath": "$ROOTPATH$/backup/backup.sh",
"bookmarks": [
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
352
]
}
]
"bookmarks": []
}

View File

@ -85,6 +85,16 @@ cleanup () {
"$cyan" "$(stamp)" "$norm" >> "$logFile"
fi
fi
# cleanup SQL dump directory if created
if [ "$sqlDumpDirCreated" -eq 1 ]; then
if ! rm -rf "$sqlDumpDir" 2>>"$logFile"; then
printf "%s[%s] -- [WARNING] Could not remove temporary SQL-dump directory. Sorry for the mess. --%s\n" \
"$warn" "$(stamp)" "$norm" >> "$logFile"
else
printf "%s[%s] -- [INFO] Temporary SQL-dump directory removed successfully --%s\n" \
"$cyan" "$(stamp)" "$norm" >> "$logFile"
fi
fi
}
# call cleanup and then exit with error report