diff --git a/systems/orangepihole/configuration.nix b/systems/orangepihole/configuration.nix index db64787..46c99f1 100644 --- a/systems/orangepihole/configuration.nix +++ b/systems/orangepihole/configuration.nix @@ -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" ]; }; };