projects
/
mgsautils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
backup.sh: Clean up junk if tar creation fails
[mgsautils.git]
/
mysql
/
backup.sh
diff --git
a/mysql/backup.sh
b/mysql/backup.sh
index a68853f7b8a37a0ba18965f9731bf52c7318f3a9..5040f3fccad94eb4d52541dbd30811736b06d1a6 100755
(executable)
--- a/
mysql/backup.sh
+++ b/
mysql/backup.sh
@@
-49,5
+49,8
@@
then
done
else
echo "Failed to create archive: ${tarname}."
+ echo "Cleaning up..."
+ cd ${stordir}
+ rm -rv ${tempdir}
exit 1
fi