gitzone

git-based zone management tool for static and dynamic domains
git clone https://git.parazyd.org/gitzone
Log | Files | Refs

commit 5cfbba0ae727994a83711413b458fc44731a398b
parent 3b8fc938053f61d2ea4c7d870387264eb0bccb8f
Author: tg(x) <*@tg-x.net>
Date:   Sat,  5 Feb 2011 19:54:09 +0100

$update_record config option

Diffstat:
Mbin/gitzone | 4++--
Metc/gitzone.conf | 3+++
2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/bin/gitzone b/bin/gitzone @@ -17,7 +17,7 @@ use POSIX qw/strftime/; use Cwd qw/cwd realpath/; use File::Basename qw/basename dirname/; -our ($zone_dir, $git, $named_checkzone, $rndc, $class, $default_view, $max_depth, $zones, $verbosity); +our ($zone_dir, $git, $named_checkzone, $rndc, $class, $default_view, $update_record, $max_depth, $zones, $verbosity); our $user = getpwuid $<; my $config_file = $ARGV[0] or die "Usage: gitzone /path/to/gitzone.conf\n"; @@ -36,7 +36,7 @@ sub clean_exit { cleanup; exit shift } $SIG{__DIE__} = \&cleanup; $_ = $ARGV[1]; -/^pre-receive$/ && pre_receive() || /^post-receive$/ && post_receive() || /^update-record$/ && update_record($ARGV[2]); +/^pre-receive$/ && pre_receive() || /^post-receive$/ && post_receive() || $update_record && /^update-record$/ && update_record($ARGV[2]); cleanup; sub git { diff --git a/etc/gitzone.conf b/etc/gitzone.conf @@ -12,6 +12,9 @@ $class = 'IN'; # default view of the zones $default_view = ''; +# update-record command: 1 = enabled, 0 = disabled +$update_record = 1; + # max depth to follow INCLUDED_BY files $max_depth = 256; # output verbosity (0..3)