From 6d410409a37db32d73280134ee542faa19dec32f Mon Sep 17 00:00:00 2001 From: deajan Date: Fri, 25 Mar 2016 21:52:31 +0100 Subject: [PATCH] Added ignore ssh knownhosts to upgrade script --- CHANGELOG.md | 1 + upgrade-v1.x-2.x.sh | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3902ac8..9b67f0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ CHANGELOG README: FreeBSD execution needs mailer (not found), sudo missing, bash needed, sed missing (see if StripQuotes mandatory) ! XX Mar 2016: obackup v2.0 released +- Added an option to ignore knownhosts for ssh connections (use with caution, this can lead to a security issue) - Improved mail fallback - More logging enhancements - Improved upgrade script diff --git a/upgrade-v1.x-2.x.sh b/upgrade-v1.x-2.x.sh index 434fba7..f59624c 100755 --- a/upgrade-v1.x-2.x.sh +++ b/upgrade-v1.x-2.x.sh @@ -6,7 +6,7 @@ AUTHOR="(L) 2015 by Orsiris \"Ozy\" de Jong" CONTACT="http://www.netpower.fr/obacup - ozy@netpower.fr" OLD_PROGRAM_VERSION="v1.x" NEW_PROGRAM_VERSION="v2.x" -PROGRAM_BUILD=2016021102 +PROGRAM_BUILD=2016032501 function Usage { echo "$PROGRAM $PROGRAM_BUILD" @@ -117,6 +117,10 @@ function RewriteConfigFiles { sed -i '/^SSH_COMPRESSION=*/a RSYNC_REMOTE_PATH=' "$config_file" fi + if ! grep "^SSH_IGNORE_KNOWN_HOSTS=" "$config_file" > /dev/null; then + sed -i '/^SSH_COMPRESSION=*/a SSH_IGNORE_KNOWN_HOSTS=no' "$config_file" + fi + if ! grep "^REMOTE_HOST_PING=" "$config_file" > /dev/null; then sed -i '/^RSYNC_REMOTE_PATH=*/a REMOTE_HOST_PING=yes' "$config_file" fi