[nsd/el6] - Only run nsdc rebuild hourly cronjob when nsd service is running
Paul Wouters
pwouters at fedoraproject.org
Sat Nov 24 16:56:32 UTC 2012
commit cbd5ae728300a3c48d41c66c1d6a5f0cd3e84007
Author: Paul Wouters <pwouters at redhat.com>
Date: Sat Nov 24 11:53:46 2012 -0500
- Only run nsdc rebuild hourly cronjob when nsd service is running
nsd.cron | 9 ++++++++-
nsd.spec | 3 +++
2 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/nsd.cron b/nsd.cron
index 53cce56..e5d5de3 100644
--- a/nsd.cron
+++ b/nsd.cron
@@ -1,9 +1,16 @@
#!/bin/sh
-# Paul Wouters <paul at xelerance.com>
+# Paul Wouters <pwouters at redhat.com>
+
# This folds back zone updates, dynamic updates, etc that nsd records
# in the ixfr.db and nsd.db files back into the zone files or vice-versa
+# Only check when nsd is actively running
+# systemd:
+# systemctl -q is-active nsd.service 2>/dev/null || exit 0
+# sysvinit: (service nsd status has useless return codes)
+pidof nsd > /dev/null || exit 0
+
# Default settings - do not edit these but /etc/sysconfig/nsd instead!
NSD_CONF="/etc/nsd/nsd.conf"
NSDC_PROG="/usr/sbin/nsdc"
diff --git a/nsd.spec b/nsd.spec
index 76090d7..169920f 100644
--- a/nsd.spec
+++ b/nsd.spec
@@ -100,6 +100,9 @@ if [ "$1" -ge "1" ]; then
fi
%changelog
+* Unreleased
+- Only run nsdc rebuild hourly cronjob when nsd service is running
+
* Fri Nov 23 2012 Paul Wouters <pwouters at redhat.com> - 3.2.14-1
- Updated to 32.14 with minor bugfixes and TCP writev support
More information about the scm-commits
mailing list