summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/dns/db.kufieta.net.zone2
-rw-r--r--data/dns/db.orbekk.shared.zone2
-rw-r--r--pkgs/zone-files/default.nix4
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'/'
'';
}