ensure ad list is built on startup
This commit is contained in:
parent
ac3767b1ec
commit
4b97ded8fd
1 changed files with 3 additions and 1 deletions
|
@ -54,7 +54,7 @@
|
|||
systemd = {
|
||||
services.adblock = {
|
||||
startAt = "daily";
|
||||
postStop = "systemctl reload unbound";
|
||||
postStop = "systemctl try-reload-or-restart unbound";
|
||||
path = with pkgs; [ gawk wget ];
|
||||
script = ''
|
||||
wget -O - https://raw.githubusercontent.com/hagezi/dns-blocklists/main/unbound/tif.blacklist.conf >> /etc/unbound/new.conf
|
||||
|
@ -63,6 +63,8 @@
|
|||
awk '!seen[$0]++' /etc/unbound/new.conf > /etc/unbound/ads.conf
|
||||
rm /etc/unbound/new.conf
|
||||
'';
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
before = [ "unbound.service" ];
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue