From 04e1b9683306718a2fe5e120ecacbda3aa474c7f Mon Sep 17 00:00:00 2001 From: Patrick Marchand Date: Thu, 26 Mar 2020 11:18:55 -0400 Subject: [PATCH] Fix the test_server() function in zzz_evobackup.default.sh.j2 The script was using the wrong ssh key to test the connection, thus reporting a failed connection even if the rest was okay. --- evobackup-client/templates/zzz_evobackup.default.sh.j2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/evobackup-client/templates/zzz_evobackup.default.sh.j2 b/evobackup-client/templates/zzz_evobackup.default.sh.j2 index 5d1c315a..c85da1b1 100644 --- a/evobackup-client/templates/zzz_evobackup.default.sh.j2 +++ b/evobackup-client/templates/zzz_evobackup.default.sh.j2 @@ -1,3 +1,4 @@ +#!/bin/sh # Careful, the zzz_evobackup template was last updated on 2020/03/23 # Script Evobackup client # See https://gitea.evolix.org/evolix/evobackup @@ -75,7 +76,7 @@ test_server() { port=$(echo "${item}" | cut -d':' -f2) # Test if the server is accepting connections - ssh -q -o "ConnectTimeout ${SSH_CONNECT_TIMEOUT}" "${host}" -p "${port}" -t "exit" + ssh -q -o "ConnectTimeout ${SSH_CONNECT_TIMEOUT}" -i /root/.ssh/evobackup_id "${host}" -p "${port}" -t "exit" # shellcheck disable=SC2181 if [ $? = 0 ]; then # SSH connection is OK