diff --git a/rosdump/application.yml b/rosdump/application.yml index e32f608..ca59493 100644 --- a/rosdump/application.yml +++ b/rosdump/application.yml @@ -8,8 +8,7 @@ data: set -e mkdir -p /root/.ssh cp /config/ssh_identity /root/.ssh/id_ecdsa - chmod 600 /root/.ssh/id_ed25519 - sleep 100 + chmod 600 /root/.ssh/id_ecdsa if [ -d rosdump ]; then echo "Pulling Git repo" cd rosdump @@ -19,13 +18,15 @@ data: git clone git@git.k-space.ee:k-space/rosdump.git cd rosdump fi + git config user.name rosdumo + git config user.email rosdump@k-space.ee git rm *.k-space.ee for target in $(cat /config/targets | grep -v '^#'); do echo "Exporting configuration for $target" ssh rosdump@$target '/export' | grep -v '^# serial number =' | grep -v '^#.* by RouterOS' > $target git add $target done - if [[ `git status --porcelain` ]]; then + if git status --porcelain; then echo "Attempting Git check in" git commit -m "$(git diff --cached --shortstat)" git push