aboutsummaryrefslogtreecommitdiff
path: root/handlers
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2008-06-25 03:27:06 +0000
committerMicah Anderson <micah@riseup.net>2008-06-25 03:27:06 +0000
commited9d104613cbe1ba7993ccb2c2542478d3fe73b9 (patch)
tree16aad6361461ada9279aef8001ca52c5e5d9dd01 /handlers
parentb499255f8a56ce3b95c2a52b8b209ae8b657bd64 (diff)
downloadbackupninja-ed9d104613cbe1ba7993ccb2c2542478d3fe73b9.tar.gz
backupninja-ed9d104613cbe1ba7993ccb2c2542478d3fe73b9.tar.bz2
stop failing on all the trac backups if just one fails
Diffstat (limited to 'handlers')
-rw-r--r--handlers/trac.in16
1 files changed, 5 insertions, 11 deletions
diff --git a/handlers/trac.in b/handlers/trac.in
index 0460c9f..a4b7bdf 100644
--- a/handlers/trac.in
+++ b/handlers/trac.in
@@ -9,7 +9,6 @@ getconf src /var/lib/trac
getconf dest /var/backups/trac
getconf tmp /var/backups/trac.tmp
-error=0
cd $src
for repo in `find . -name VERSION`
do
@@ -38,19 +37,14 @@ do
fi
if [ $code != 0 ]; then
error "command failed -- trac-admin $src/$repo hotcopy $tmp/$repo"
- error=1
fi
done
-if [ $error -eq 1 ]; then
- echo "Error: because of earlier errors, we are leaving trac backups in $tmp instead of $dest"
-else
- if [ -d $dest -a -d $tmp ]; then
- rm -rf $dest
- fi
- if [ -d $tmp ]; then
- mv $tmp $dest
- fi
+if [ -d $dest -a -d $tmp ]; then
+ rm -rf $dest
+fi
+if [ -d $tmp ]; then
+ mv $tmp $dest
fi
exit 0