update lester
This commit is contained in:
parent
da03b88b53
commit
61a0b75bc5
5 changed files with 27 additions and 13 deletions
14
update-lester.sh
Executable file
14
update-lester.sh
Executable file
|
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
oldip="$(grep -Po '^lester.* \K(\d+\.){3}\d+$' zones/xaviera.systems.zone)"
|
||||||
|
newip="$(curl -fsS https://ipv4.icanhazip.com)"
|
||||||
|
|
||||||
|
[[ "$oldip" = "$newip" ]] && { echo "Nothing to do"; exit; }
|
||||||
|
|
||||||
|
for file in $(grep -lr "$oldip"); do
|
||||||
|
sed -i "s/${oldip}/${newip}/g" "$file"
|
||||||
|
awk -i inplace '/; serial/{sub(/[0-9]+/, $1+1)} 1' "$file"
|
||||||
|
done
|
||||||
|
|
||||||
|
git diff
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
$ORIGIN cryptid.gay.
|
$ORIGIN cryptid.gay.
|
||||||
@ 3600 IN SOA ns3.xaviera.systems. admin.k7dxs.net. (
|
@ 3600 IN SOA ns3.xaviera.systems. admin.k7dxs.net. (
|
||||||
7 ; serial
|
8 ; serial
|
||||||
28800 ; refresh (8 hours)
|
28800 ; refresh (8 hours)
|
||||||
7200 ; retry (2 hours)
|
7200 ; retry (2 hours)
|
||||||
2419200 ; expire (4 weeks)
|
2419200 ; expire (4 weeks)
|
||||||
|
|
@ -13,8 +13,8 @@ $ORIGIN cryptid.gay.
|
||||||
@ 300 IN NS ns4.xaviera.systems.
|
@ 300 IN NS ns4.xaviera.systems.
|
||||||
|
|
||||||
; Primary host
|
; Primary host
|
||||||
@ 300 IN A 67.1.137.70
|
@ 300 IN A 67.1.110.169
|
||||||
* 300 IN A 67.1.137.70
|
* 300 IN A 67.1.110.169
|
||||||
|
|
||||||
p8 300 IN A 34.83.91.242
|
p8 300 IN A 34.83.91.242
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
$ORIGIN dxs.gay.
|
$ORIGIN dxs.gay.
|
||||||
@ 3600 IN SOA ns3.xaviera.systems. admin.k7dxs.net. (
|
@ 3600 IN SOA ns3.xaviera.systems. admin.k7dxs.net. (
|
||||||
27 ; serial
|
28 ; serial
|
||||||
28800 ; refresh (8 hours)
|
28800 ; refresh (8 hours)
|
||||||
7200 ; retry (2 hours)
|
7200 ; retry (2 hours)
|
||||||
2419200 ; expire (4 weeks)
|
2419200 ; expire (4 weeks)
|
||||||
|
|
@ -13,7 +13,7 @@ $ORIGIN dxs.gay.
|
||||||
@ 3600 IN NS ns4.xaviera.systems.
|
@ 3600 IN NS ns4.xaviera.systems.
|
||||||
|
|
||||||
; Primary host
|
; Primary host
|
||||||
@ 300 IN A 67.1.137.70
|
@ 300 IN A 67.1.110.169
|
||||||
|
|
||||||
; Infrastructure
|
; Infrastructure
|
||||||
l1.i 3600 IN CNAME l1.i.xaviera.systems.
|
l1.i 3600 IN CNAME l1.i.xaviera.systems.
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
$ORIGIN k7dxs.net.
|
$ORIGIN k7dxs.net.
|
||||||
k7dxs.net. 3600 IN SOA ns3.k7dxs.net. admin.k7dxs.net. (
|
k7dxs.net. 3600 IN SOA ns3.k7dxs.net. admin.k7dxs.net. (
|
||||||
1383 ; serial
|
1384 ; serial
|
||||||
28800 ; refresh (8 hours)
|
28800 ; refresh (8 hours)
|
||||||
7200 ; retry (2 hours)
|
7200 ; retry (2 hours)
|
||||||
2419200 ; expire (4 weeks)
|
2419200 ; expire (4 weeks)
|
||||||
|
|
@ -12,7 +12,7 @@ k7dxs.net. 3600 IN SOA ns3.k7dxs.net. admin.k7dxs.net. (
|
||||||
@ 3600 IN NS ns3.xaviera.systems.
|
@ 3600 IN NS ns3.xaviera.systems.
|
||||||
@ 3600 IN NS ns4.xaviera.systems.
|
@ 3600 IN NS ns4.xaviera.systems.
|
||||||
ns1 3600 IN A 74.207.242.178
|
ns1 3600 IN A 74.207.242.178
|
||||||
ns2 3600 IN A 67.1.137.70
|
ns2 3600 IN A 67.1.110.169
|
||||||
ns3 3600 IN A 132.226.25.26
|
ns3 3600 IN A 132.226.25.26
|
||||||
ns4 3600 IN A 35.211.215.197
|
ns4 3600 IN A 35.211.215.197
|
||||||
|
|
||||||
|
|
@ -36,7 +36,7 @@ nlb-free.oci 3600 IN A 152.70.145.252
|
||||||
*.intel-free-2.oci 3600 IN CNAME intel-free-2.oci.k7dxs.net.
|
*.intel-free-2.oci 3600 IN CNAME intel-free-2.oci.k7dxs.net.
|
||||||
|
|
||||||
; Other hosts
|
; Other hosts
|
||||||
home 3600 IN A 67.1.137.70
|
home 3600 IN A 67.1.110.169
|
||||||
mail 60 IN A 204.17.32.157 ; temp - need to get on own ip
|
mail 60 IN A 204.17.32.157 ; temp - need to get on own ip
|
||||||
pbx 3600 IN A 45.79.86.20
|
pbx 3600 IN A 45.79.86.20
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
$ORIGIN xaviera.systems.
|
$ORIGIN xaviera.systems.
|
||||||
@ 3600 IN SOA ns3.xaviera.systems. admin.k7dxs.net. (
|
@ 3600 IN SOA ns3.xaviera.systems. admin.k7dxs.net. (
|
||||||
69 ; serial
|
70 ; serial
|
||||||
300 ; refresh (unused)
|
300 ; refresh (unused)
|
||||||
300 ; retry (unused)
|
300 ; retry (unused)
|
||||||
300 ; expire (unused)
|
300 ; expire (unused)
|
||||||
|
|
@ -12,13 +12,13 @@ $ORIGIN xaviera.systems.
|
||||||
@ 3600 IN NS ns3.xaviera.systems.
|
@ 3600 IN NS ns3.xaviera.systems.
|
||||||
@ 3600 IN NS ns4.xaviera.systems.
|
@ 3600 IN NS ns4.xaviera.systems.
|
||||||
ns1 3600 IN A 74.207.242.178
|
ns1 3600 IN A 74.207.242.178
|
||||||
ns2 300 IN A 67.1.137.70
|
ns2 300 IN A 67.1.110.169
|
||||||
ns3 3600 IN A 132.226.25.26
|
ns3 3600 IN A 132.226.25.26
|
||||||
ns4 3600 IN A 35.211.215.197
|
ns4 3600 IN A 35.211.215.197
|
||||||
|
|
||||||
; Hosts
|
; Hosts
|
||||||
@ 300 IN A 67.1.137.70 ; Lester
|
@ 300 IN A 67.1.110.169 ; Lester
|
||||||
vpn 300 IN A 67.1.137.70
|
vpn 300 IN A 67.1.110.169
|
||||||
|
|
||||||
; Infrastructure
|
; Infrastructure
|
||||||
l1.i 3600 IN A 74.207.242.178 ; Linode 1
|
l1.i 3600 IN A 74.207.242.178 ; Linode 1
|
||||||
|
|
@ -27,7 +27,7 @@ o2.i 3600 IN A 152.70.129.235 ; Oracle 2 (intel
|
||||||
o3.i 3600 IN A 132.226.25.26 ; Oracle 3 (intel-free-2)
|
o3.i 3600 IN A 132.226.25.26 ; Oracle 3 (intel-free-2)
|
||||||
|
|
||||||
; Lester
|
; Lester
|
||||||
lester 3600 IN A 67.1.137.70
|
lester 3600 IN A 67.1.110.169
|
||||||
truenas.lester 3600 IN A 192.168.70.41
|
truenas.lester 3600 IN A 192.168.70.41
|
||||||
|
|
||||||
; Login
|
; Login
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue