From: Mark Seamans <marks@crvinc.com>
To: Netfilter <netfilter@lists.netfilter.org>
Subject: scripting issue
Date: Tue, 1 Apr 2003 15:43:54 -0600 [thread overview]
Message-ID: <200304011543.54597.marks@crvinc.com> (raw)
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
next reply other threads:[~2003-04-01 21:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-01 21:43 Mark Seamans [this message]
2003-04-01 22:41 ` scripting issue Kelly Setzer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200304011543.54597.marks@crvinc.com \
--to=marks@crvinc.com \
--cc=netfilter@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox