From 709c78569b26677624e60588fa1166dc659ac93c Mon Sep 17 00:00:00 2001 From: Ole Mathias Heggem Date: Sat, 21 Jan 2023 19:07:38 +0100 Subject: chore: cleanup repo --- bootstrap/make-bind-include.pl | 48 ------------------------------------------ 1 file changed, 48 deletions(-) delete mode 100755 bootstrap/make-bind-include.pl (limited to 'bootstrap/make-bind-include.pl') diff --git a/bootstrap/make-bind-include.pl b/bootstrap/make-bind-include.pl deleted file mode 100755 index 880280e..0000000 --- a/bootstrap/make-bind-include.pl +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/perl -I /root/tgmanage -use strict; - -unless ( (($#ARGV == 0 ) || ( $#ARGV == 1)) - && (( $ARGV[0] eq "master" ) || ( $ARGV[0] eq "slave" )) ) -{ - print STDERR "Invalid usage!\ncat netnames.txt | $0 [basedir]\n"; - exit 1; -} - -my $role = $ARGV[0]; - -my $base = "/etc"; -$base = $ARGV[1] if $#ARGV == 1; -$base .= "/" if not $base =~ m/\/$/ and not $base eq ""; - -my $bind_base = $base . "bind/"; -my $masterinclude = $bind_base . "named.master-include.conf"; -my $slaveinclude = $bind_base . "named.slave-include.conf"; - -my $glob; -my @configs; - -if ( $role eq "master" ) -{ - $glob = $bind_base . "conf-master/*.conf"; - @configs = glob($glob); - - open CONF, ">" . $masterinclude or die ( $! . " " . $masterinclude); - foreach my $config ( @configs ) - { - print CONF "include \"" . $config . "\";\n"; - } - close CONF; -} - -if ( $role eq "slave" ) -{ - $glob = $bind_base . "conf-slave/*.conf"; - @configs = glob($glob); - - open CONF, ">" . $slaveinclude or die ( $! . " " . $slaveinclude); - foreach my $config ( @configs ) - { - print CONF "include \"" . $config . "\";\n"; - } - close CONF; -} -- cgit v1.2.3