restart_dns 459 B

1234567891011121314151617181920212223
  1. #!/bin/bash
  2. # Internal vesta function
  3. # dns system restart
  4. # Importing variables
  5. source $VESTA/conf/vars.conf
  6. bind() {
  7. /etc/init.d/named 'reload' >/dev/null 2>&1
  8. if [ $? -ne 0 ]; then
  9. #$V_FUNC/report_issue 'sys' 'cron'
  10. echo "$E_RESTART_FAILED $V_EVENT"
  11. fi
  12. }
  13. # Parsing config / or just source config
  14. dns_system=$(grep 'DNS_SYSTEM=' $V_CONF/vesta.conf | cut -f 2 -d \' )
  15. if [ "$dns_system" = 'bind' ]; then
  16. bind
  17. fi
  18. exit $OK