v_restart_dns 1002 B

123456789101112131415161718192021222324252627282930313233343536
  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/vars.conf
  12. source $V_CONF/vesta.conf
  13. #----------------------------------------------------------#
  14. # Action #
  15. #----------------------------------------------------------#
  16. if [ "$DNS_SYSTEM" = 'bind' ]; then
  17. /etc/init.d/named reload >/dev/null 2>&1
  18. if [ $? -ne 0 ]; then
  19. #$V_FUNC/report_issue 'sys' 'cron'
  20. echo "$E_RESTART $1"
  21. exit $E_RESTART
  22. fi
  23. fi
  24. #----------------------------------------------------------#
  25. # Vesta #
  26. #----------------------------------------------------------#
  27. exit