mirror of
https://github.com/edu4rdshl/linuxscripts.git
synced 2026-07-17 23:24:52 +00:00
Add services.
This commit is contained in:
parent
601180cbdd
commit
24ea6da17f
2 changed files with 24 additions and 0 deletions
15
etc/systemd/system/update-ablock-hosts.service
Normal file
15
etc/systemd/system/update-ablock-hosts.service
Normal 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
|
||||||
9
etc/systemd/system/update-ablock-hosts.timer
Normal file
9
etc/systemd/system/update-ablock-hosts.timer
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Timer for updating StevenBlack hosts daily.
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnBootSec=15s
|
||||||
|
OnUnitActiveSec=1d
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
||||||
Loading…
Add table
Add a link
Reference in a new issue