add check of zonefile
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Jochen Welzel 2021-01-18 18:32:56 +01:00
parent f6fc52a669
commit 793b657890

View File

@ -17,6 +17,12 @@ for file in $CHFILENAMES; do
exit 1
fi
ZONE=$(echo $file | sed 's/\.zone//')
echo "Check uploaded zone file"
ssh -i /root/.ssh/id_rsa -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null "$PLUGIN_USER"@"$PLUGIN_HOSTS" nsd-checkzone $ZONE "$PLUGIN_TARGET"/"$file"
if [ $? -ne 0 ]; then
echo "Zone file check failed" 1>&2
exit 1
fi
echo "Reload $ZONE zone"
ssh -i /root/.ssh/id_rsa -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null "$PLUGIN_USER"@"$PLUGIN_HOSTS" nsd-control reload $ZONE
if [ $? -ne 0 ]; then