From 41861cb4d365ff22b42bba0a7e191d4f12746ba5 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Fri, 21 Jul 2023 21:01:35 +0200 Subject: [PATCH] debug --- app.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app.sh b/app.sh index 0639cf9..102dec1 100644 --- a/app.sh +++ b/app.sh @@ -43,9 +43,13 @@ while true ; do if [ -d "$GIT_REPO_PATH" ] ; then cd "$GIT_REPO_PATH" if [ -d ".git" ] ; then + echo pull + pwd git pull "$GIT_REPO_REMOTE_NAME" "$GIT_REPO_BRANCH" --quiet fi else + echo clone + pwd git clone "$GIT_REPO_URL" "$GIT_REPO_PATH" --quiet fi @@ -67,8 +71,14 @@ while true ; do echo "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 + echo sed + pwd 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" + echo add + pwd git add "config_${FQDN}.rsc" + echo commit + pwd git commit -m "update config_${FQDN}" --quiet done <<< "$DEVICES"