mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 15:11:25 +00:00
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.
This commit is contained in:
parent
5f27abec23
commit
06520c7fb7
@ -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 = {
|
||||
|
Loading…
Reference in New Issue
Block a user