1
0
mirror of https://github.com/moderntld/.o.git synced 2024-05-11 05:54:56 +00:00
moderntld-.o/verify_domains.sh
Jonah Aragon 9333929d92 Add automatic domain checks
This will automatically check whether or not a new zonefile is valid, and if it contains the appropriate domain records on every commit (and Pull Request!)
2019-03-24 17:00:25 -05:00

18 lines
288 B
Bash

cd zone
for f in *
do
while read domain; do
FIRST=`echo "$domain" | awk '{print $1;}'`
if [[ $FIRST == *$f ]]; then
echo $FIRST > /dev/null
else
echo $FIRST
echo "A line in ${f} does not match the domain name!"
exit 1
fi
done <$f
done
exit 0