From 1d5d1b4b1793251e6f95a6093cf8b0a277c301e0 Mon Sep 17 00:00:00 2001 From: deajan Date: Fri, 9 Sep 2016 09:01:25 +0200 Subject: [PATCH] Added encrpytion options to upgrade script --- upgrade-v1.x-2.1x.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/upgrade-v1.x-2.1x.sh b/upgrade-v1.x-2.1x.sh index 1b72ef3..496db14 100755 --- a/upgrade-v1.x-2.1x.sh +++ b/upgrade-v1.x-2.1x.sh @@ -6,7 +6,7 @@ AUTHOR="(C) 2016 by Orsiris de Jong" CONTACT="http://www.netpower.fr/obacup - ozy@netpower.fr" OLD_PROGRAM_VERSION="v1.x" NEW_PROGRAM_VERSION="v2.1x" -PROGRAM_BUILD=2016081901 +PROGRAM_BUILD=2016090901 ## type -p does not work on platforms other than linux (bash). If if does not work, always as$ if ! type "$BASH" > /dev/null; then @@ -69,12 +69,12 @@ function RewriteConfigFiles { sed -i'.tmp' '/^FILE_STORAGE=*/a\'$'\n''ENCRYPTION=no\'$'\n''' "$config_file" fi - if ! grep "^ENCRYPT_STORAGE=" "$config_file" > /dev/null; then - sed -i'.tmp' '/^ENCRYPTION=*/a\'$'\n''ENCRYPT_STORAGE=/home/storage/backup/crypt\'$'\n''' "$config_file" + if ! grep "^CRYPT_STORAGE=" "$config_file" > /dev/null; then + sed -i'.tmp' '/^ENCRYPTION=*/a\'$'\n''CRYPT_STORAGE=/home/storage/backup/crypt\'$'\n''' "$config_file" fi - if ! grep "^ENCRYPT_PUBKEY=" "$config_file" > /dev/null; then - sed -i'.tmp' '/^ENCRYPT_STORAGE=*/a\'$'\n''ENCRYPTION='${HOME}/.gpg/pubkey'\'$'\n''' "$config_file" + if ! grep "^GPG_RECIPIENT=" "$config_file" > /dev/null; then + sed -i'.tmp' '/^CRYPT_STORAGE=*/a\'$'\n''GPG_RECIPIENT=John Doe\'$'\n''' "$config_file" fi sed -i'.tmp' 's/^DISABLE_GET_BACKUP_FILE_SIZE=no/GET_BACKUP_SIZE=yes/g' "$config_file"