From 47f2771b5ffd5d65d8265549daa3bb45af2423e9 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 9 Apr 2019 14:39:04 +0200 Subject: backup.in: only the first hop needs to be reachable via ping (think of firewalls!) --- backup.in | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/backup.in b/backup.in index 1831235..6c3c774 100755 --- a/backup.in +++ b/backup.in @@ -169,14 +169,13 @@ fi echo $$ > "${pidFile}" -if [ -n "${QuellIP}" ]; then - if ! ping -c1 -${ipVer} "$(extract_ssh_host "${QuellIP}")" >/dev/null; then +if [ -n "${HoppIP}" ]; then + if ! ping -c1 -${ipVer} "$(extract_ssh_host "${HoppIP}")" >/dev/null; then rm "${pidFile}" exit 11 fi -fi -if [ -n "${HoppIP}" ]; then - if ! ping -c1 -${ipVer} "$(extract_ssh_host "${HoppIP}")" >/dev/null; then +elif [ -n "${QuellIP}" ]; then + if ! ping -c1 -${ipVer} "$(extract_ssh_host "${QuellIP}")" >/dev/null; then rm "${pidFile}" exit 11 fi -- cgit v1.2.3