CI: supprimer avant d'ajouter
DNS automated deployment / deploy (push) Failing after 1s
Details
DNS automated deployment / deploy (push) Failing after 1s
Details
This commit is contained in:
parent
e531957faf
commit
2e40af4350
|
@ -39,7 +39,27 @@ jobs:
|
|||
echo -e "server ${{vars.DNS_SERVER}}\nttl 3600\nupdate add $RECORD\nsend" > temp_delete
|
||||
nsupdate -k temp_keyfile temp_delete
|
||||
rm temp_delete
|
||||
elif [[ $line == +* ]]; then # Enregistrement ajouté
|
||||
fr
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done < zone_diff.txt
|
||||
while IFS= read -r line; do
|
||||
#echo "* line: $line"
|
||||
case "$line" in
|
||||
"--- "*".zone")
|
||||
NAME=$(echo "$line" .zone | sed 's/--- //' | sed 's|a/||')
|
||||
CURRENT_ZONE=$(basename $NAME)
|
||||
echo "*** Updating $CURRENT_ZONE"
|
||||
;;
|
||||
"--- "*)
|
||||
CURRENT_ZONE=
|
||||
;;
|
||||
"+++"*)
|
||||
;;
|
||||
"-"*IN* | "+"*IN*)
|
||||
if [ ! -z $CURRENT_ZONE ]; then
|
||||
if [[ $line == +* ]]; then # Enregistrement ajouté
|
||||
RECORD=$(echo "$line" | sed 's/^+//' | sed "s/^\([^ ]\+\)\(\s\+\)\(IN\s\+\)\([^ ]\+\)\(\s\+\)/\1.${CURRENT_ZONE}.\2\3\4\5/" | sed 's/@.//')
|
||||
echo "update add $RECORD"
|
||||
echo -e "server ${{vars.DNS_SERVER}}\nttl 3600\nupdate add $RECORD\nsend" > temp_add
|
||||
|
|
Loading…
Reference in New Issue