Compare commits
2 Commits
edf69129db
...
3907e583fb
Author | SHA1 | Date |
---|---|---|
Adrien Bourmault | 3907e583fb | |
Adrien Bourmault | 7721d852e2 |
|
@ -32,19 +32,15 @@ jobs:
|
||||||
if [[ $line == -* ]]; then # Enregistrement supprimé
|
if [[ $line == -* ]]; then # Enregistrement supprimé
|
||||||
RECORD=$(echo "$line" | sed 's/^-//')
|
RECORD=$(echo "$line" | sed 's/^-//')
|
||||||
echo "update delete $RECORD"
|
echo "update delete $RECORD"
|
||||||
nsupdate -k $TSIG_KEY <<ENDOFFILE
|
echo -e "server $DNS_SERVER\nupdate delete $RECORD\nsend" > temp_delete
|
||||||
server $DNS_SERVER
|
nsupdate -k "${{ secrets.TSIG_KEY }}" temp
|
||||||
update delete $RECORD
|
rm temp
|
||||||
send
|
|
||||||
ENDOFFILE
|
|
||||||
elif [[ $line == +* ]]; then # Enregistrement ajouté
|
elif [[ $line == +* ]]; then # Enregistrement ajouté
|
||||||
RECORD=$(echo "$line" | sed 's/^+//')
|
RECORD=$(echo "$line" | sed 's/^+//')
|
||||||
echo "+ $RECORD"
|
echo "+ $RECORD"
|
||||||
nsupdate -k $TSIG_KEY <<ENDOFFILE
|
echo -e "server $DNS_SERVER\nupdate add $RECORD\nsend" > temp_add
|
||||||
server $DNS_SERVER
|
nsupdate -k "${{ secrets.TSIG_KEY }}" temp
|
||||||
update add $RECORD
|
rm add
|
||||||
send
|
|
||||||
ENDOFFILE
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in New Issue