scripting:updatesoa.sh
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
scripting:updatesoa.sh [2015-03-08 22:36] – description gabriel | scripting:updatesoa.sh [2019-08-10 17:25] (current) – moving gitab note to top gabriel | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== updatesoa.sh | + | ====== updatesoa.sh ====== |
+ | |||
+ | //This script is now maintained on [[https:// | ||
I created this script as a simple reimplementation of a tool that I used in an old job. It allows you to easily update the serial number for a DNS zone in an automated fashion avoiding errors. | I created this script as a simple reimplementation of a tool that I used in an old job. It allows you to easily update the serial number for a DNS zone in an automated fashion avoiding errors. | ||
- | It's best used in conjunction with an $INCLUDE statement in the zone file referencing a separate SOA file, especially if multiple zones exist on your server. | + | It's best used in conjunction with an $INCLUDE statement in the zone file referencing a separate SOA file, especially if multiple zones exist on your server. |
<code bash> | <code bash> | ||
#!/bin/bash | #!/bin/bash | ||
+ | # | ||
+ | # updatesoa.sh - a simple script to update BIND SOA serial numbers | ||
# | # | ||
# Copyright (c) 2011 Gabriel M. O' | # Copyright (c) 2011 Gabriel M. O' | ||
Line 64: | Line 68: | ||
</ | </ | ||
+ | |||
+ | If successful you will see something like this: | ||
+ | |||
+ | <code bash> | ||
+ | root@jupiter:/ | ||
+ | Current DNS serial: | ||
+ | New DNS serial: | ||
+ | SOA updated. | ||
+ | </ | ||
+ | |||
+ | Reminder: after this you will need to reload the zone! | ||
+ | |||
+ | Obvious error conditions are trapped in the script but it is probably far from foolproof. |
scripting/updatesoa.sh.1425868599.txt.gz · Last modified: 2015-03-08 22:36 by gabriel