709b0f5
#!/bin/sh
709b0f5
3902fb1
# Paul Wouters <pwouters@redhat.com>
3902fb1
12a40fb
# This folds back zone updates, dynamic updates, etc that nsd records
Fabio Alessandro Locati 05a4b5a
# in the nsd.db file back into the zone files
709b0f5
3902fb1
# Only check when nsd is actively running
Fabio Alessandro Locati 05a4b5a
# sysvinit: (service nsd status has useless return codes)
c376124
pidof nsd > /dev/null  || exit 0
3902fb1
a236fa7
# Default settings - do not edit these but /etc/sysconfig/nsd instead!
a236fa7
NSD_CONF="/etc/nsd/nsd.conf"
Fabio Alessandro Locati 05a4b5a
NSDC_PROG="/usr/sbin/nsd-control"
a236fa7
NSD_CHECKCONF_PROG="/usr/sbin/nsd-checkconf"
a236fa7
a236fa7
# Read in local settings.
a236fa7
[ -r /etc/sysconfig/nsd ] && . /etc/sysconfig/nsd
a236fa7
Fabio Alessandro Locati 05a4b5a
# needed to avoid useless AVC rhbz#989218
Fabio Alessandro Locati 05a4b5a
cd ~nsd
Fabio Alessandro Locati 05a4b5a
c376124
${NSDC_PROG} -c ${NSD_CONF} write > /dev/null 2>&1