fix? check

This commit is contained in:
Michael Grote 2023-11-24 12:11:39 +01:00
parent b945874d43
commit 8cac7b026f

2
app.sh
View file

@ -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