DNS Magic: cronjobs

The lastest version of this page can be found at:
http://www.crufty.net/help/dns/cron.html

The following list describes some of the standard modules provided for automating DNS updates. Not all are specific to DNS Magic. Note that we do not install many of these by default as every site has their own thoughts on what they do or do not want to automate.

The .list files mentioned refer to the configs(8) list that installs the file. If no .list is mentioned the file is not installed automagically and needs to be manually created (or a local .list file created) if desired. See configs(8) for details.

S00os.sh
cronjob.list: Standard OS setup. cronjob.list, is included by dnsmagic-cronjob.list
S01site.sh
cronjob.list: Just sets a suitable PATH
S02redirect.sh
cronjob.list: Sets up environment such that all output can be collected and e-mailed to admin (see mailrep.sh)
S05lsetup.sh
dnsmagic-cronjob.list: This is not included with DNSMagic but will be installed if it can be found under /configs (eg. /configs/local/usr/local/share/dns/cron.d/lsetup.sh) and is a good place to set WORK_DIR to where you want DNS cron jobs to play. It goes without saying that WORK_DIR must exist and must contain a checked out copy of the DNS repository.
S06interlock.sh
dnsmagic-cronjob.list: Provides interlocking between cron jobs.
S10setup.sh
cd's to WORK_DIR, ensures there is a private temp directory and updates PATH.
S15cvs_update
dnsmagic-cronjob.list: Makes sure that WORK_DIR has an up to date copy of the DNS repository.
S20atjobs
Used in the hourly cronjob to handle one off scheduled changes. Basically it processes any files named for the current year month day and hour and renames them such that they will not be processed again even if atjobs is run multiple times in the same hour. The processing is handled in the same was as rc.sh(8).
S80cvs_commit
dnsmagic-updrevs.list: Commits changes made so far. This is necessary for updrevs to do its job accurately. dnsmagic-updrevs.list includes dnsmagic-cronjob.list
S82dnsmagic
This is the job that updates the live DNS directory and reloads or bounces the live named if needed. It is performed as part of S85updrevs, so only one of these jobs need be run. While /etc/rc_d/dnsmagic is always installed, the link to S82dnsmagic is not and must be manually made by sites that actually want this degree of automation.
S85updrevs
dnsmagic-updrevs.list: This job is the main event. It updates the live tree with the just committed changes (unless .nomagic is present in WORK_DIR), and bounces named(8) if needed. It then runs getdb to get named(8) to dump its cache and then format it using getdata. Finally it runs updrev to generate any missing PTR records for networks that the nameserver is authoritative for.
S88cvs_diff
dnsmagic-cronjob.list: Records the changes made by updrevs
S90cvs_commit
dnsmagic-cronjob.list: Commits any changes (eg. made by updrevs)
S92dnsmagic
dnsmagic-updrevs.list: This is the job that updates the live DNS directory and reloads or bounces the live named if needed.
S99mailrep.sh
cronjob.list: E-mails the report to admin, a copy will also be kept in WORK_DIR called hourly.rep for the hourly cron job.

$Id: cron.html,v 1.10 2001/08/30 07:48:42 sjg Exp $
Copyright © 1997-2001 Simon J. Gerraty