| 12345678910111213141516171819202122232425262728293031323334353637 |
- #!/bin/bash
- # info: restart dns service
- # options: none
- #
- # The function tells BIND service to reload dns zone files.
- #----------------------------------------------------------#
- # Variable&Function #
- #----------------------------------------------------------#
- # Includes
- source $VESTA/conf/vesta.conf
- source $VESTA/func/main.sh
- EVENT=${1-$EVENT}
- #----------------------------------------------------------#
- # Action #
- #----------------------------------------------------------#
- if [ "$DNS_SYSTEM" = 'bind' ]; then
- /etc/init.d/named reload &>/dev/null
- if [ $? -ne 0 ]; then
- /etc/init.d/named restart &>/dev/null
- if [ $? -ne 0 ]; then
- log_event "$E_RESTART" "$EVENT"
- exit $E_RESTART
- fi
- fi
- fi
- #----------------------------------------------------------#
- # Vesta #
- #----------------------------------------------------------#
- exit
|