:
# NAME:
#	dnsmagic - the cron job that keeps our primary NS happy
#
# DESCRIPTION:
#	This is a handy script for humans or cron(8) to run to simply
#	"make it happen".
#
# SEE ALSO:
#	upddns(8), bouncedns(8)
#
# AUTHOR:
#	Simon J. Gerraty <sjg@crufty.net>

# RCSid:
#	$Id: dnsmagic,v 1.5 2023/06/11 18:35:13 sjg Exp $
#
#	@(#)Copyright (c) 1994-2001 Simon J. Gerraty.
#	All rights reserved.
#	
#	This software is the property of Simon J. Gerraty.
#	It may be used only in accordance with the conditions outlined
#	in the accompanying LICENSE file. If your distribution does
#	not contain a LICENSE file, then you have no rights to use
#	this software and should contact sales@crufty.net to obtain a
#	licensed distribution.
#	
#	This software is provided "AS IS" in the hope that it will be
#	of use.  Since it is not possible to anticipate all possible
#	use of this software, there is absolutely NO WARRANTY.
#
#	Please forward bug reports and fixes to help@crufty.net
#

# a dance to find RC_D
Mydir=`dirname $0`
for d in $RC_D $Mydir $Mydir/../etc/rc_d /etc/rc_d
do
	test -s $d/dnsfuncs.sh || continue
	RC_D=`cd $d && 'pwd'`; export RC_D
	break
done

# update anything necessary
$RC_D/upddns
# reload named if need be
$RC_D/bouncedns start
# make sure it is running
$RC_D/named check

