summaryrefslogtreecommitdiff
path: root/pkgs
diff options
context:
space:
mode:
authorKjetil Orbekk <kjetil.orbekk@gmail.com>2017-05-21 11:09:17 -0400
committerKjetil Orbekk <kjetil.orbekk@gmail.com>2017-05-21 11:13:46 -0400
commitfa802fafb8c64f3922a90af387c3887d9dd8984f (patch)
treed2da02679c7ee7113b6160755707deaba5720995 /pkgs
parent568de131ff615ad6a19b138626be28748be60c87 (diff)
dns: Auto updating serials
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/zone-files/default.nix4
1 files changed, 4 insertions, 0 deletions
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'/'
'';
}