v_restart_dns 966 B

12345678910111213141516171819202122232425262728293031323334
  1. #!/bin/bash
  2. # info: restart dns service
  3. # options: none
  4. #
  5. # The function tells BIND service to reload dns zone files.
  6. #----------------------------------------------------------#
  7. # Variable&Function #
  8. #----------------------------------------------------------#
  9. # Importing variables
  10. source /etc/profile.d/vesta.sh
  11. source $VESTA/conf/vesta.conf
  12. #----------------------------------------------------------#
  13. # Action #
  14. #----------------------------------------------------------#
  15. if [ "$DNS_SYSTEM" = 'bind' ]; then
  16. /etc/init.d/named reload >/dev/null 2>&1
  17. if [ $? -ne 0 ]; then
  18. #$V_FUNC/report_issue 'sys' 'cron'
  19. echo "$E_RESTART_FAILED $V_EVENT"
  20. fi
  21. fi
  22. #----------------------------------------------------------#
  23. # Vesta #
  24. #----------------------------------------------------------#
  25. exit