59f2339c2c5bfae149187f765ddccefaae1d507b

Author
Christopher Smith <csmith@squiz.net>
Committer
Christopher Smith <csmith@squiz.net>
Date

Message

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 192a2e5c182e48097badc36844622ea6a42bbcf9..84b41fb852afadd58ce1fe6917c1d6bbd92518eb 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