This commit is contained in:
Michael Grote 2023-07-21 20:26:53 +02:00
parent ee668eaa5f
commit 80f1cd121e

4
x
View file

@ -68,10 +68,10 @@ while read -r FQDN SSH_KEY_PATH; do
echo "Error: can not export $FQDN config" echo "Error: can not export $FQDN config"
exit 2 exit 2
fi fi
echo "export $FQDN config." echo "export $FQDN config"
ssh -n -i "$SSH_KEY_PATH" "$FQDN" "/export show-sensitive" > "config_${FQDN}.rsc" ssh -n -i "$SSH_KEY_PATH" "$FQDN" "/export show-sensitive" > "config_${FQDN}.rsc"
# entferne Datumszeile # entferne Datumszeile
sed -i -r '/^# [0-9]{4}-[0-9]{2}-[0-9]{2}\s[0-9]{2}\:[0-9]{2}\:[0-9]{2}\sby\sRouterOS\s[0-9\s\.]+/d' sed -i -r '/^# [0-9]{4}-[0-9]{2}-[0-9]{2}\s[0-9]{2}\:[0-9]{2}\:[0-9]{2}\sby\sRouterOS\s[0-9\s\.]+/d' "config_${FQDN}.rsc"
git add "config_${FQDN}.rsc" git add "config_${FQDN}.rsc"
git commit -m "update config_${FQDN}" git commit -m "update config_${FQDN}"
done <<< "$DEVICES" done <<< "$DEVICES"