Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Need help in writing shell script Post 302848679 by VKIRUPHAKARAN on Thursday 29th of August 2013 06:34:34 PM
Old 08-29-2013
Dear Team,

Appreciate for your suggestions/inputs , below is the detailed steps that are performed and would like to be accomplished using script.

please let me know if this helps?

1. Log in to primary DNS server - Script has to be run both locally and remotely on many servers.

2. Need to check /etc/named.conf file if the zone is already created (grep –i 10.0.11 named.conf)
Eg: if want to add server 10.0.11.13 in to DNS
Code:
zone "11.0.10.in-addr.arpa" in {
type master;
file "db.10.0.11";
};

3. If zone is already existing in the above step when queried, need to go to /var/named directory
4. Then add server entry in file db.10.0.11
EG: 13 IN PTR servername.fg.net. And modify the serial number to yyyymmdd as below highlighted.
Suppose if entry is made on 20th November enter the serial number as 20111120

Code:
root@PDNS1A101 # cat db.10.0.99
$TTL 5h
;SOA rec
99.0.10. in-addr.arpa. IN SOA PDNS1A101.fg.net. root.PDNS1A101.fg.net. ( 20090101; serial number ( you should change to 20111120)
10800; refresh every 3 hours
10800; retry every 3 hours
604800; expire after a week
86400) ; TTL of 1 day
; Name Servers
99.0.10.in-addr.arpa. IN NS PDNS1A101.fg.net.
;Pointer records for 10.0.99

11 IN PTR PSPROA167.fg.net.
12 IN PTR PSPROD055.fg.net.
5. need to add the entry in db.fg.net and also have to change serial number
6. Restart dns service -- svcadm restart dns/server
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need help with writing shell script

I have the following output. I want to write a script to check for 1. waits > 0 on all rowsand Ratio > .0. if true then send email. ========================= ROLLBACK SEGMENT CONTENTION ========================= If any ratio is > .01 then more rollback segments are needed NAME ... (1 Reply)
Discussion started by: jigarlakhani
1 Replies

2. UNIX for Dummies Questions & Answers

Writing a shell Script

How to write a shell script file to read 5 numbers using a while loop. Finding the average, maximum and minumum for the numbers. Any help would be great. (1 Reply)
Discussion started by: Chin
1 Replies

3. Shell Programming and Scripting

Need help for writing shell script

Hello ALL, I am fresher in Unix . i need help to write small shell script . Please help me unix guru. I am developing the internal site in my office . the data files are generated in one directory everyday . I have to write shell script to sort those files and put it is internal site . ... (3 Replies)
Discussion started by: deepa20
3 Replies

4. AIX

Difference between writing Unix Shell script and AIX Shell Scripts

Hi, Please give me the detailed Differences between writing Unix Shell script and AIX Shell Scripts. Thanks in advance..... (0 Replies)
Discussion started by: haroonec
0 Replies

5. Shell Programming and Scripting

Writing shell script

Hi, I am a new for shell script. i need to write script using the following commands cd /usres/test # create directory mkdir temp+DATE( i need to append date ) #moving files from one directory to this directory(we need to check total files in source and taget) cd /users/sample ... (2 Replies)
Discussion started by: bmkreddy
2 Replies

6. Shell Programming and Scripting

Need help in writing the shell script

Can anyone please help me in writing a shell script that would check if a particular user(xyz) has logged in, and if yes, the audit daemon needs to be started. When the user logs off the dameon needs to shutdown , and the report needs to be e-mailed to a set of users. (12 Replies)
Discussion started by: ggayathri
12 Replies

7. UNIX and Linux Applications

Need help in writing shell script

I have written a shell script and when i ran the script,for some point of time it is asking to press enter key manually using keyboard.So i need it the enter key in shell itself. ex : in my shell script,i used the command ssh-keygen -t rsa so it asks the enter 3 times. can you please let me know... (3 Replies)
Discussion started by: lkeswar
3 Replies

8. Shell Programming and Scripting

Writing a shell script

Hi I have two files a.log and b.log . i need to append a.log and b.log so that at the end of first line in a.log i need the append the data of first line from b.log and end of the second line in a.log i need to append the data of second line from b.log and so on up to the end of the file can... (3 Replies)
Discussion started by: lalu
3 Replies

9. Shell Programming and Scripting

Need help writing shell script!

Hi, I'm very new to this, so bear with me please. I want to write a sh script (or if there's a better format please let me know) that allows me to, when I run it, print the date to a file (1.out) take 2 arguments (files a.fa and b.fa), run them with another program, outputting to 2.out, and then... (2 Replies)
Discussion started by: ShiGua
2 Replies

10. UNIX for Dummies Questions & Answers

Need help writing shell script!

Hi, I'm very new to this, so bear with me please. I want to write a sh script (or if there's a better format please let me know) that allows me to, when I run it, print the date to a file (1.out) take 2 arguments (files a.fa and b.fa), run them with another program, outputting to 2.out, and then... (4 Replies)
Discussion started by: ShiGua
4 Replies
opendkim-atpszone(8)					      System Manager's Manual					      opendkim-atpszone(8)

NAME
opendkim-atpszone - DKIM ATPS zone file generation tool SYNOPSIS
opendkim-atpszone [-A] [-C address] [-E secs] [-h hash] [-N ns[,...]] [-o file] [-r secs] [-R secs] [-S] [-t secs] [-T secs] [-v] [dataset] DESCRIPTION
opendkim-atpszone generates a file suitable for use with named(8) to publish a set of domains authorized as third-party signers for a local domain. The dataset parameter should specify a set of data as described in the opendkim(8) man page. It can currently refer to flat files, Sleepy- cat databases, comma-separated lists, LDAP directories or SQL databases. The keys in the named database are assumed to comprise a set of domains that are to be advertised using the experimental Authorized Third-Party Signers protocol as permitted to sign mail using DKIM on behalf of the local domain. Values in the database are not used. OPTIONS
-A Adds a "._atps" suffix to records in the zone file. -C contact Uses contact as the contact information to be used when an SOA record is generated (see -S below). If not specified, the userid of the executing user and the local hostname will be used; if the executing user can't be determined, "hostmaster" will be used. -E secs When generating an SOA record (see -S below), use secs as the default record expiration time. The default is 604800. -h hash Specifies which SHA hash algorithm to use. Must be one of "none", "sha1" and "sha256", with "sha256" being the default if it is available. -N nslist Specifies a comma-separated list of nameservers, which will be output in NS records before the TXT records. The first nameserver in this list will also be used in the SOA record (if -S is also specified) as the authority hostname. -o file Sends output to the named file rather than standard output. -r secs When generating an SOA record (see -S below), use secs as the zone refresh time. The default is 10800. -R secs When generating an SOA record (see -S below), use secs as the zone retry time. The default is 1800. -S Asks for an SOA record to be generated at the top of the output. The content of this output can be controlled using the -E, -r, -R, -T options. The serial number will be generated based on the current time of day. -t ttl Puts a TTL (time-to-live) value of ttl on all records output. The units are in seconds. -T secs When generating an SOA record (see -S below), use secs as the default record TTL time. The default is 86400. -v Increases the verbosity of debugging output written to standard error. VERSION
This man page covers the version of opendkim-atpszone that shipped with version 2.6.8 of OpenDKIM. COPYRIGHT
Copyright (c) 2011, 2012, The OpenDKIM Project. All rights reserved. SEE ALSO
opendkim(8), opendkim.conf(5) The OpenDKIM Project opendkim-atpszone(8)
All times are GMT -4. The time now is 02:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy