diff options
author | Joachim Fasting <joachifm@fastmail.fm> | 2017-03-08 03:09:22 +0100 |
---|---|---|
committer | Joachim Fasting <joachifm@fastmail.fm> | 2017-03-08 19:07:53 +0100 |
commit | 06520c7fb785b872e17112bf8be0b6ae1d7d0ec0 (patch) | |
tree | 3ba5ff9bbcade2594d761e14996caa9c3e573fae /nixos/modules/services/networking/dnscrypt-proxy.nix | |
parent | 5f27abec233604ebe543e4fc833f282a7c835b3f (diff) |
nixos/dnscrypt-proxy: indicate update status
Make it easier for the user to tell when the list is updated
and, at their option, see what changed.
Diffstat (limited to 'nixos/modules/services/networking/dnscrypt-proxy.nix')
-rw-r--r-- | nixos/modules/services/networking/dnscrypt-proxy.nix | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/nixos/modules/services/networking/dnscrypt-proxy.nix b/nixos/modules/services/networking/dnscrypt-proxy.nix index ad1559e21df7..8e9747b29667 100644 --- a/nixos/modules/services/networking/dnscrypt-proxy.nix +++ b/nixos/modules/services/networking/dnscrypt-proxy.nix @@ -266,7 +266,7 @@ in requires = [ "init-dnscrypt-proxy-statedir.service" ]; after = [ "init-dnscrypt-proxy-statedir.service" ]; - path = with pkgs; [ curl dnscrypt-proxy minisign ]; + path = with pkgs; [ curl diffutils dnscrypt-proxy minisign ]; script = '' cd ${stateDirectory} domain=download.dnscrypt.org @@ -278,7 +278,13 @@ in mv dnscrypt-resolvers.csv.minisig{.tmp,} minisign -q -V -p ${upstreamResolverListPubKey} \ -m dnscrypt-resolvers.csv.tmp -x dnscrypt-resolvers.csv.minisig + [[ -f dnscrypt-resolvers.csv ]] && mv dnscrypt-resolvers.csv{,.old} mv dnscrypt-resolvers.csv{.tmp,} + if cmp dnscrypt-resolvers.csv{,.old} ; then + echo "no change" + else + echo "resolver list updated" + fi ''; serviceConfig = { |