From 75e2041b0f34a3b1ac07b93542056267c6842078 Mon Sep 17 00:00:00 2001 From: Adrien Bourmault Date: Tue, 20 Aug 2024 18:29:12 +0200 Subject: [PATCH] .forgejo/workflows/ci.yaml: correcting error with records --- .forgejo/workflows/ci.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.forgejo/workflows/ci.yaml b/.forgejo/workflows/ci.yaml index fb83752..71364ac 100644 --- a/.forgejo/workflows/ci.yaml +++ b/.forgejo/workflows/ci.yaml @@ -31,14 +31,14 @@ jobs: "-"* | "+"*) if [ ! -z $CURRENT_ZONE ]; then if [[ $line == -* ]]; then # Enregistrement supprimé - RECORD=$(echo "$line" | sed 's/^-//') + RECORD=$(echo "$line" | sed 's/^+//' | sed 's/^\([^ ]\+\)\(\s\+\)\(IN A\)\(\s\+\)[^ ]\+/\1.a-lec.org.\2\3/') echo "update delete $RECORD" echo -e "server ${{vars.DNS_SERVER}}\nupdate delete $RECORD\nsend" > temp_delete nsupdate -6 -k temp_keyfile temp_delete rm temp_delete elif [[ $line == +* ]]; then # Enregistrement ajouté - RECORD=$(echo "$line" | sed 's/^+//') - echo "+ $RECORD" + RECORD=$(echo "$line" | sed 's/^+//' | sed 's/^\([^ ]\+\)\(\s\+\)\(IN A\)/\1.a-lec.org.\2\3/') + echo "update add $RECORD" echo -e "server ${{vars.DNS_SERVER}}\nupdate add $RECORD\nsend" > temp_add nsupdate -6 -k temp_keyfile temp_add rm temp_add