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 /pkgs | |
parent | 568de131ff615ad6a19b138626be28748be60c87 (diff) |
dns: Auto updating serials
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/zone-files/default.nix | 4 |
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'/' ''; } |