vesta/func/restart_dns
2011-06-14 00:22:25 +03:00

24 lines
459 B
Bash
Executable File

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