Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

systemd service file and timer #685

Open
aboe76 opened this issue Oct 30, 2021 · 1 comment
Open

systemd service file and timer #685

aboe76 opened this issue Oct 30, 2021 · 1 comment

Comments

@aboe76
Copy link

aboe76 commented Oct 30, 2021

I have created a simple systemd service file and timer to update the blacklist for unbound, maybe it is usefull:

unbound-updateblacklist.service

[Unit]
Description=Update blacklist for unbound
After=network.target

[Service]
Type=oneshot
Group=unbound
ExecStart=/usr/bin/wget https://raw.githubusercontent.com/notracking/hosts-blocklists/master/unbound/unbound.blacklist.conf -O /etc/unbound/local.d/unbound.blacklist.conf
ExecStartPost=/usr/bin/systemctl try-restart unbound.service
SuccessExitStatus=1

unbound-updateblacklist.timer

[Unit]
Description=Run updateblacklist weekly

[Timer]
OnCalendar=weekly
Persistent=true

[Install]
WantedBy=timers.target
@notracking
Copy link
Owner

Should add this somewhere in the wiki.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants