From c5f72997f876f3f8c20b12a43d02c278fc1c113b Mon Sep 17 00:00:00 2001 From: Robin Kloppe Date: Tue, 30 Apr 2024 20:57:57 +0200 Subject: [PATCH] static passphrase --- backup-server.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/backup-server.sh b/backup-server.sh index ba6714a..7fedc05 100644 --- a/backup-server.sh +++ b/backup-server.sh @@ -49,10 +49,18 @@ BDIRS="etc var/customers" ENDDIR="/media/hddmount/duplicity" LOGDIR='/var/log/duplicity' # must exist -# Setting the pass phrase to encrypt the backup files. Will use symmetrical keys in this case. +# Setting the passphrase to encrypt the backup files. Will use symmetrical keys in this case. # Set one Password per Backup -PASSPHRASE=$(dd if=/dev/urandom 2>/dev/null | tr -cd '[:alnum:]' | fold -w21 | head -1) -export PASSPHRASE +# Hint: generate a safe password: dd if=/dev/urandom 2>/dev/null | tr -cd '[:alnum:]' | fold -w21 | head -1 +PASSPHRASE="none" + +if [ $PASSPHRASE != "none" ] +then + export PASSPHRASE +else + echo "Please set a passphrase in the skript" + exit 1 +fi # encryption algorithm for gpg, disable for default (CAST5) # see available ones via 'gpg --version'