close logs

This commit is contained in:
Vincent Riquer 2012-02-13 09:29:31 +01:00
parent d3fd152166
commit a76bc6bc98
2 changed files with 13 additions and 0 deletions

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
remote-backup (1.5.2) stable; urgency=low
* close log before printing failed backups info
-- Vincent Riquer <v.riquer@b2f-concept.com> Mon, 13 Feb 2012 09:28:40 +0100
remote-backup (1.5.1) stable; urgency=low remote-backup (1.5.1) stable; urgency=low
* fix typo in rsync failure code * fix typo in rsync failure code

View File

@ -91,6 +91,11 @@ openLog() {
exec 2>&1 exec 2>&1
} }
closeLog() {
exec 1>&3
exec 2>&3
}
doBackup() { doBackup() {
config="$1" config="$1"
if [ ! -e "$config" ] if [ ! -e "$config" ]
@ -280,6 +285,8 @@ else
done done
fi fi
closeLog
if (( ${#failedBackups} )) if (( ${#failedBackups} ))
then then
cat <<-EOF cat <<-EOF