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 = {
|
systemd = {
|
||||||
services.adblock = {
|
services.adblock = {
|
||||||
startAt = "daily";
|
startAt = "daily";
|
||||||
postStop = "systemctl reload unbound";
|
postStop = "systemctl try-reload-or-restart unbound";
|
||||||
path = with pkgs; [ gawk wget ];
|
path = with pkgs; [ gawk wget ];
|
||||||
script = ''
|
script = ''
|
||||||
wget -O - https://raw.githubusercontent.com/hagezi/dns-blocklists/main/unbound/tif.blacklist.conf >> /etc/unbound/new.conf
|
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
|
awk '!seen[$0]++' /etc/unbound/new.conf > /etc/unbound/ads.conf
|
||||||
rm /etc/unbound/new.conf
|
rm /etc/unbound/new.conf
|
||||||
'';
|
'';
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
before = [ "unbound.service" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue