582416f2e67e64236e53f53d9c14df667b77aba5

Author
Joubert <joubert@redrat.com.br>
Committer
Joubert <joubert@redrat.com.br>
Date

Message

A small contribution with a set a ftp variable to run on a script

Diff

 1diff --git a/duplicity-backup.conf.example b/duplicity-backup.conf.example
 2index bde6dc9accfa39ba4ed4f7eeec45db2c0b0ac481..3fb5a7d4cc4b829071dc57931cf3f9b539f50360 100644
 3--- a/duplicity-backup.conf.example
 4+++ b/duplicity-backup.conf.example
 5@@ -104,6 +104,11 @@ DEST="s3+http://backup-bucket/backup-folder/"
 6 #DEST="ssh://user[:password]@other.host[:port]/[/]some_dir"
 7 #DEST="file:///home/foobar_user_name/new-backup-test/"
 8 
 9+# FTP PASSWORD
10+# If you want to set a ftp password without a ftp:// you can to set a password
11+# in a FTP_PASSWORD
12+#FTP_PASSWORD="your_ftp_password"
13+
14 # INCLUDE LIST OF DIRECTORIES
15 # Here is a list of directories to include; if you want to include
16 # everything that is in root, you could leave this list empty (I think).
17diff --git a/duplicity-backup.sh b/duplicity-backup.sh
18index 9f40ef780c1b3a1fbf542dd1b483fa6b56455154..563877a8506fcc52af118f64386a82bdfb688786 100755
19--- a/duplicity-backup.sh
20+++ b/duplicity-backup.sh
21@@ -159,6 +159,9 @@ export AWS_ACCESS_KEY_ID
22 export AWS_SECRET_ACCESS_KEY
23 export PASSPHRASE
24 export SIGN_PASSPHRASE
25+if [[ -n "$FTP_PASSWORD" ]]; then
26+  export FTP_PASSWORD
27+fi
28 
29 LOGFILE="${LOGDIR}${LOG_FILE}"
30 DUPLICITY="$(which duplicity)"