From 59f2339c2c5bfae149187f765ddccefaae1d507b Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Fri, 5 Dec 2014 09:39:05 +1100 Subject: [PATCH] add an option to set the tmpdir for duplicity to use. --- duplicity-backup.conf.example | 3 +++ duplicity-backup.sh | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/duplicity-backup.conf.example b/duplicity-backup.conf.example index 1e585bb..0cd5a00 100644 --- a/duplicity-backup.conf.example +++ b/duplicity-backup.conf.example @@ -269,3 +269,6 @@ MAIL="mailx" # default command for Linux mail # printed to the logfile. This way, you can see if the problem is with the # script or with duplicity. #ECHO=$(which echo) + +# Set the tmpdir for duplicity to use. +#TMPDIR="/tmp" diff --git a/duplicity-backup.sh b/duplicity-backup.sh index 192a2e5..84b41fb 100755 --- a/duplicity-backup.sh +++ b/duplicity-backup.sh @@ -177,6 +177,10 @@ if [[ -n "$FTP_PASSWORD" ]]; then export FTP_PASSWORD fi +if [[ -n "$TMPDIR" ]]; then + export TMPDIR +fi + # Ensure a trailing slash always exists in the log directory name LOGDIR="${LOGDIR%/}/"