extra_commands="rebuild"
extra_started_commands="reload"
description="NSD is an authoritative only, high performance, open source name server"
+description_rebuild="Rebuild zone database"
description_reload="Rebuild zone database and reload it"
config_file=${config_file:-/etc/nsd/nsd.conf}
local database=$(${my_nsd_checkconf} -o database ${config_file})
if ! test -f $database; then
eerror "You have no database file in ${database}, will try to rebuild"
- _rebuild
+ rebuild
fi
return 0
}
start() {
ebegin "Starting NSD"
+
+ local pidfile=$(${my_nsd_checkconf} -o pidfile ${config_file})
+ checkpath -d -o nsd:nsd $(dirname ${pidfile})
+
_checkconf || return 1
- _checkdb || rebuild || return 1
+ _checkdb || return 1
${my_nsdc} start
${my_nsdc} running
eend $?