From 8cac7b026f77dc36d1d9c734fd9bb826bfb57fb1 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Fri, 24 Nov 2023 12:11:39 +0100 Subject: [PATCH 1/2] fix? check --- app.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.sh b/app.sh index ee838dd..7536c56 100644 --- a/app.sh +++ b/app.sh @@ -67,7 +67,7 @@ while true ; do exit 2 fi # check if target is reachable - if ping -c1 -W1 "${FQDN}" > /dev/null; then + if ssh -q -i "$SSH_KEY_PATH" -o StrictHostKeyChecking=no -o BatchMode=yes -o ConnectTimeout=5 "${USERNAME}@${FQDN}" ; then echo "[INFO] export $FQDN config..." ssh -n -o StrictHostKeyChecking=no -i "$SSH_KEY_PATH" "${USERNAME}@${FQDN}" "/export show-sensitive" > "config_${FQDN}.rsc" 2> /dev/null # entferne Datumszeile From b178711b78b050fb516c816e17a24c2c24b62a7e Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Fri, 24 Nov 2023 12:13:21 +0100 Subject: [PATCH 2/2] linter --- app.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.sh b/app.sh index 7536c56..a8700f2 100644 --- a/app.sh +++ b/app.sh @@ -67,7 +67,7 @@ while true ; do exit 2 fi # check if target is reachable - if ssh -q -i "$SSH_KEY_PATH" -o StrictHostKeyChecking=no -o BatchMode=yes -o ConnectTimeout=5 "${USERNAME}@${FQDN}" ; then + if ssh -n -q -i "$SSH_KEY_PATH" -o StrictHostKeyChecking=no -o BatchMode=yes -o ConnectTimeout=5 "${USERNAME}@${FQDN}" ; then echo "[INFO] export $FQDN config..." ssh -n -o StrictHostKeyChecking=no -i "$SSH_KEY_PATH" "${USERNAME}@${FQDN}" "/export show-sensitive" > "config_${FQDN}.rsc" 2> /dev/null # entferne Datumszeile