mirror of
https://github.com/m13253/dns-over-https.git
synced 2026-03-30 14:15:40 +00:00
Add systemd units
This commit is contained in:
14
systemd/Makefile
Normal file
14
systemd/Makefile
Normal file
@@ -0,0 +1,14 @@
|
||||
.PHONY: install uninstall
|
||||
|
||||
PREFIX = /usr/local
|
||||
SYSTEMD_DIR = /usr/lib/systemd
|
||||
SYSTEMD_UNIT_DIR = $(SYSTEMD_DIR)/system
|
||||
|
||||
install:
|
||||
install -Dm0644 doh-client.service "$(DESTDIR)$(SYSTEMD_UNIT_DIR)/doh-client.service"
|
||||
install -Dm0644 doh-server.service "$(DESTDIR)$(SYSTEMD_UNIT_DIR)/doh-server.service"
|
||||
systemctl daemon-reload || true
|
||||
|
||||
uninstall:
|
||||
rm -f "$(DESTDIR)$(SYSTEMD_UNIT_DIR)/doh-client.service" "$(DESTDIR)$(SYSTEMD_UNIT_DIR)/doh-server.service"
|
||||
systemctl daemon-reload || true
|
||||
15
systemd/doh-client.service
Normal file
15
systemd/doh-client.service
Normal file
@@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=DNS-over-HTTPS Client
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||
ExecStart=/usr/local/bin/doh-client -addr :53 -upstream https://dns.google.com/resolve
|
||||
LimitNOFILE=1048576
|
||||
Restart=always
|
||||
RestartSec=3
|
||||
Type=simple
|
||||
User=nobody
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
15
systemd/doh-server.service
Normal file
15
systemd/doh-server.service
Normal file
@@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=DNS-over-HTTPS Server
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||
ExecStart=/usr/local/bin/doh-server
|
||||
LimitNOFILE=1048576
|
||||
Restart=always
|
||||
RestartSec=3
|
||||
Type=simple
|
||||
User=nobody
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user