This commit is contained in:
Michael Grote 2023-07-21 19:04:24 +02:00
parent 8a5de81a8c
commit 72263bf475

2
x
View file

@ -65,8 +65,10 @@ while read -r FQDN SSH_KEY_PATH; do
# prüfe ob Key existiert # prüfe ob Key existiert
if [ ! -e "$SSH_KEY_PATH" ] ; then if [ ! -e "$SSH_KEY_PATH" ] ; then
echo "File $SSH_KEY_PATH does not exist." echo "File $SSH_KEY_PATH does not exist."
echo "cant not export $FQDN config."
exit 2 exit 2
fi fi
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"
git add "config_${FQDN}.rsc" git add "config_${FQDN}.rsc"
git commit -m "update config_${FQDN}" git commit -m "update config_${FQDN}"