Move systemd service file from main CoreDNS README (#6)

This commit is contained in:
John Belamaric 2017-04-24 11:06:56 -04:00 committed by Miek Gieben
parent 00c1933046
commit 8a21a7ac52
2 changed files with 21 additions and 0 deletions

4
systemd/README.md Normal file
View 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
View 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