diff options
Diffstat (limited to 'make-bindconfig-from-ldap')
-rwxr-xr-x | make-bindconfig-from-ldap | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/make-bindconfig-from-ldap b/make-bindconfig-from-ldap index 96c805b..2f9fc90 100755 --- a/make-bindconfig-from-ldap +++ b/make-bindconfig-from-ldap @@ -85,7 +85,11 @@ use English; $ENV{'PATH'} = '/bin:/usr/bin'; delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'}; -my $NAMEDCONF = '/etc/bind/named.conf.from-opium.ldapzones.slave.pushed'; +my $SOURCE_HOST = 'unknown'; +if ($PROGRAM_NAME =~ m/-host-([a-z0-9]+)$/) { + $SOURCE_HOST = $1; +}; +my $NAMEDCONF = "/etc/bind/named.conf.from-$SOURCE_HOST.ldapzones.slave.pushed"; my @RELOAD = qw{/etc/init.d/bind9 reload}; my @THISNAMES = qw{asteria.debian.or.at.}; #my @THISNAMES = qw{seppia.noreply.org. ns3.noreply.org.}; @@ -133,7 +137,7 @@ for my $line (@lines) { print CONF << "EOF"; zone "$domain" { type slave; - file "from-opium-slave-ldap-$domain"; + file "from-$SOURCE_HOST-slave-ldap-$domain"; allow-transfer { "none"; }; allow-query { any; }; masters { |