41897f4c62
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|2670|2|2668|2|:-1:
Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/unstable/442//ansiblelint">Evolix » ansible-roles » unstable #442</a>
gitea/ansible-roles/pipeline/head This commit looks good
37 lines
620 B
Bash
Executable file
37 lines
620 B
Bash
Executable file
#!/bin/bash
|
|
#
|
|
# Script utilitaire pour tester et recharger facilement une zone dans Bind
|
|
#
|
|
|
|
usage() {
|
|
echo "Usage: bind-reload-zone <DOMAIN>"
|
|
echo " bind-reload-zone -h|--help"
|
|
}
|
|
|
|
if [ $# -ne 1 ] ; then
|
|
usage
|
|
exit 1
|
|
fi
|
|
|
|
while :; do
|
|
case $1 in
|
|
-h|--help)
|
|
usage
|
|
exit 0
|
|
;;
|
|
*)
|
|
zone=$1
|
|
break
|
|
;;
|
|
esac
|
|
shift
|
|
done
|
|
|
|
if ! [ -f "/etc/bind/db.${zone}" ]; then
|
|
>&2 echo "Error: zone for ${zone} not found."
|
|
usage
|
|
exit 1
|
|
fi
|
|
|
|
named-checkzone "${zone}" /etc/bind/db."${zone}" && rndc reload "${zone}"
|
|
|