diff options
author | Kjetil Orbekk <kjetil.orbekk@gmail.com> | 2017-05-21 11:09:17 -0400 |
---|---|---|
committer | Kjetil Orbekk <kjetil.orbekk@gmail.com> | 2017-05-21 11:13:46 -0400 |
commit | fa802fafb8c64f3922a90af387c3887d9dd8984f (patch) | |
tree | d2da02679c7ee7113b6160755707deaba5720995 | |
parent | 568de131ff615ad6a19b138626be28748be60c87 (diff) |
dns: Auto updating serials
-rw-r--r-- | data/dns/db.kufieta.net.zone | 2 | ||||
-rw-r--r-- | data/dns/db.orbekk.shared.zone | 2 | ||||
-rw-r--r-- | pkgs/zone-files/default.nix | 4 |
3 files changed, 6 insertions, 2 deletions
diff --git a/data/dns/db.kufieta.net.zone b/data/dns/db.kufieta.net.zone index 49ee23d..1e9fe40 100644 --- a/data/dns/db.kufieta.net.zone +++ b/data/dns/db.kufieta.net.zone @@ -1,6 +1,6 @@ $TTL 3600 @ IN SOA kremkake.trygveandre.net. root.kufieta.net. ( - 1495378650; serial + $serial; serial 600; refresh 900; retry 2419200; expire diff --git a/data/dns/db.orbekk.shared.zone b/data/dns/db.orbekk.shared.zone index 6dd6a5b..0d7e1cf 100644 --- a/data/dns/db.orbekk.shared.zone +++ b/data/dns/db.orbekk.shared.zone @@ -1,6 +1,6 @@ $TTL 600 @ IN SOA kremkake.trygveandre.net. root.orbekk.com. ( - 1495378651; serial + $serial; serial 600; refresh 900; retry 2419200; expire diff --git a/pkgs/zone-files/default.nix b/pkgs/zone-files/default.nix index 46c76d0..01e0614 100644 --- a/pkgs/zone-files/default.nix +++ b/pkgs/zone-files/default.nix @@ -12,5 +12,9 @@ stdenv.mkDerivation rec { # Rewrite relative include paths sed $out/* -i -e 's,^$INCLUDE \([^/]\),$INCLUDE '$out'/\1,' + + # Substitute serials + now=$(date +%s) + sed $out/* -i -e 's/$serial/'$now'/' ''; } |