Add services.

This commit is contained in:
Edu4rdSHL 2021-03-20 19:58:24 -05:00
parent 601180cbdd
commit 24ea6da17f
2 changed files with 24 additions and 0 deletions

View file

@ -0,0 +1,15 @@
[Unit]
Description=Update adblock hosts from SetevenBlack list.
After=network-online.target
[Service]
ExecStart=bash -c 'curl -so /etc/hosts https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling/hosts && resolvectl flush-caches'
StartLimitBurst=5
StartLimitInterval=500
Restart=on-failure
RestartSec=5s
KillMode=process
KillSignal=SIGINT
[Install]
WantedBy=default.target

View file

@ -0,0 +1,9 @@
[Unit]
Description=Timer for updating StevenBlack hosts daily.
[Timer]
OnBootSec=15s
OnUnitActiveSec=1d
[Install]
WantedBy=timers.target