mirror of
https://github.com/notherealmarco/coredns-deployment.git
synced 2025-05-05 12:32:34 +02:00
Move systemd service file from main CoreDNS README (#6)
This commit is contained in:
parent
00c1933046
commit
8a21a7ac52
2 changed files with 21 additions and 0 deletions
4
systemd/README.md
Normal file
4
systemd/README.md
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
# Systemd Service File
|
||||||
|
|
||||||
|
Use `coredns.service` as a systemd service file. It defaults to a coredns with a homedir of `/home/coredns`
|
||||||
|
and the binary lives in `/opt/bin` and the config in `/etc/coredns/Corefile`.
|
17
systemd/coredns.service
Normal file
17
systemd/coredns.service
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
[Unit]
|
||||||
|
Description=CoreDNS DNS server
|
||||||
|
Documentation=https://coredns.io
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
PermissionsStartOnly=true
|
||||||
|
LimitNOFILE=8192
|
||||||
|
User=coredns
|
||||||
|
WorkingDirectory=/home/coredns
|
||||||
|
ExecStartPre=/sbin/setcap cap_net_bind_service=+ep /opt/bin/coredns
|
||||||
|
ExecStart=/opt/bin/coredns -conf=/etc/coredns/Corefile
|
||||||
|
ExecReload=/bin/kill -SIGUSR1 $MAINPID
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Loading…
Add table
Add a link
Reference in a new issue