Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Mar 1998 11:16:20 -0600 (CST)
From:      Jeff Lynch <jeff@mercury.jorsm.com>
To:        freebsd-isp@FreeBSD.ORG
Subject:   Re: in search of a program
Message-ID:  <Pine.BSF.3.95q.980304111025.4117G-100000@mercury.jorsm.com>
In-Reply-To: <199803041345.IAA28740@bilver.magicnet.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 4 Mar 1998, Bill Vermillion wrote:

> I've been handling all my manual, but I find I've been doing it
> slightly differently than others.
[solution explaination deleted]

Here's another solution...

----cut here-----
#!/bin/sh
echo -n "Enter the domain name: (jorsm.com) "
read DOMAIN

if [ -n "`grep $DOMAIN /etc/named.boot`" ]
then
	echo $DOMAIN is already in named.boot shithead
	exit
fi

LEVEL2=`echo $DOMAIN | cut -d. -f1`

echo -n "Enter the www IP address: (207.112.128.x) "
read IPADDR

# Y2K compliance
DATE=`date '+%Y%m%d'`

cat > named.$LEVEL2	<<EOM
; /var/named/named.$LEVEL2	Origin is $DOMAIN
;
@		IN	SOA	ns1.jorsm.com. hostmaster.jorsm.com. (
				${DATE}01	; serial
				86400		; refresh:	1 day
				3600		; retry:	1 hour
				3600000		; expire:	42 days
				604800		; minnumim:	1 week
				)
		IN	NS	ns1.jorsm.com.
		IN	NS	ns2.nap.net.
;
; mailhost
		IN	MX	10 www.$DOMAIN.
;
; loopback address
localhost	IN	A	127.0.0.1
;
; Ethernet segment
www		IN	A	$IPADDR
EOM

printf "primary    %-28.28s named.%s\n" $DOMAIN $LEVEL2 >> /etc/named.boot

mail -s "secondary dns" dns@domain.com << EOM2
forward to dns@secondarydns.provider
----cut here----
Please secondary...

secondary $DOMAIN 207.112.128.2 secondaries/db.$DOMAIN

Thank you.
EOM2

kill -HUP `cat /var/run/named.pid`

echo "$0 for $DOMAIN complete. here's an nslookup to prove it...."
nslookup www.$DOMAIN
------end ----------

Hope this helps.

--jeff

=========================================================================
Jeffrey A. Lynch			      JORSM Internet
email: jeff@jorsm.com		Northwest Indiana's Full-Service Provider
Voice: (219)322-2180		   927 Sheffield Avenue, Dyer, IN 46311
Autoresponse: info@jorsm.com		   http://www.jorsm.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isp" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95q.980304111025.4117G-100000>