* scripting issue
@ 2003-04-01 21:43 Mark Seamans
2003-04-01 22:41 ` Kelly Setzer
0 siblings, 1 reply; 2+ messages in thread
From: Mark Seamans @ 2003-04-01 21:43 UTC (permalink / raw)
To: Netfilter
Although this doesn't have anything to do with iptables, I do
believe that you will have the best answer. Simple script that will
insert a line in a remote server's named.conf. BUT IT WONT WORK!
I have been beating my head. I have seen some pretty fancy shell
scripts in this list so here is the command I am using:
I am trying to create a little menu that will make it eaiser for non-linux
users to manage dns....Personally, I like VI, but hey...
Variables:
NAMEDCFG="/etc/bind/named.conf
DOMAINNAME= script asks user this question....
NS2=....server ip number.
${SSH} -l root ${NS2} echo -e "zone \"${DOMAINNAME}\" {" >> '${NAMEDCFG}''
${SSH} -l root ${NS2} echo -e " type slave;" >> ${NAMEDCFG}
${SSH} -l root ${NS2} echo -e " file \"sec/dbsec.${DOMAINNAME}\";" >> ${NAMEDCFG}
${SSH} -l root ${NS2} echo -e " masters { 10.10.10.10; };" >> ${NAMEDCFG}
${SSH} -l root ${NS2} echo -e "};" >> ${NAMEDCFG}
Now any other command works like this:
${SSH} -l root ${NS2} ${TAR} -cf ${NAMEDCFG}.${DATE}.tar ${NAMEDCFG} > /dev/null 2>&1
But the above echo statetment just echo's the data to the LOCAL named.conf not to the remote system.
Any words of advice would be great. I'm sure that someone out there has ran across this. If there is a
better way, please note it.
Thanks,
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: scripting issue
2003-04-01 21:43 scripting issue Mark Seamans
@ 2003-04-01 22:41 ` Kelly Setzer
0 siblings, 0 replies; 2+ messages in thread
From: Kelly Setzer @ 2003-04-01 22:41 UTC (permalink / raw)
To: Mark Seamans; +Cc: netfilter
On Tue, Apr 01, 2003 at 03:43:54PM -0600, Mark Seamans wrote:
> Although this doesn't have anything to do with iptables, I do
> believe that you will have the best answer. Simple script that will
> NAMEDCFG="/etc/bind/named.conf
> DOMAINNAME= script asks user this question....
> NS2=....server ip number.
> ${SSH} -l root ${NS2} echo -e "zone \"${DOMAINNAME}\" {" >> '${NAMEDCFG}''
> ${SSH} -l root ${NS2} echo -e " type slave;" >> ${NAMEDCFG}
> ${SSH} -l root ${NS2} echo -e " file \"sec/dbsec.${DOMAINNAME}\";" >> ${NAMEDCFG}
> ${SSH} -l root ${NS2} echo -e " masters { 10.10.10.10; };" >> ${NAMEDCFG}
> ${SSH} -l root ${NS2} echo -e "};" >> ${NAMEDCFG}
#!/bin/bash
# don't quibble about my choice of bash
NAMEDCFG="/etc/bind/named.conf
DOMAINNAME= script asks user this question....
NS2=....server ip number.
{
cat <<EOF
zone ${DOMAINNAME} {
type slave;
file "sec/dbsec.${DOMAINNAME}";
masters { 10.10.10.10; };
};
EOF
} | ${SSH} root@${NS2} "cat - >> $NAMEDCFG"
Kelly
--
Kelly Setzer, System Administrator/Architect - Placemark Investments
14180 Dallas Pkwy, Suite 200, Dallas, TX 75240
kelly.setzer@placemark.com http://www.placemark.com
(972)404-8100x41 (work) (214) 287-3464 (cell)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-04-01 22:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-01 21:43 scripting issue Mark Seamans
2003-04-01 22:41 ` Kelly Setzer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox