edca6379ec700f9ced84388876b85f985350c658

Author
zertrin <zrk951@gmail.com>
Committer
zertrin <zrk951@gmail.com>
Date

Message

Merge pull request #75 from csmithATsquiz/tmpdir

add an option to set the tmpdir for duplicity to use.

Diff

 1diff --git a/duplicity-backup.conf.example b/duplicity-backup.conf.example
 2index 1e585bb2cd51fbe25b7f4ce59b9170fcff018f21..0cd5a002b64b9b47fae54619c3f1d76b1df0bd7b 100644
 3--- a/duplicity-backup.conf.example
 4+++ b/duplicity-backup.conf.example
 5@@ -269,3 +269,6 @@ MAIL="mailx"     # default command for Linux mail
 6 # printed to the logfile.  This way, you can see if the problem is with the
 7 # script or with duplicity.
 8 #ECHO=$(which echo)
 9+
10+# Set the tmpdir for duplicity to use.
11+#TMPDIR="/tmp"
12diff --git a/duplicity-backup.sh b/duplicity-backup.sh
13index 5444fb473b5e1427b376aadeae7c91f98b2a3425..745e635140e8b20310dc26a6aab22c53816d651d 100755
14--- a/duplicity-backup.sh
15+++ b/duplicity-backup.sh
16@@ -177,6 +177,10 @@ if [[ -n "$FTP_PASSWORD" ]]; then
17   export FTP_PASSWORD
18 fi
19 
20+if [[ -n "$TMPDIR" ]]; then
21+  export TMPDIR
22+fi
23+
24 # Ensure a trailing slash always exists in the log directory name
25 LOGDIR="${LOGDIR%/}/"
26