Systemd sysusers directory (#68)

Signed-off-by: Lorenzo Fontana <lo@linux.com>
This commit is contained in:
Lorenzo Fontana 2018-04-06 12:26:50 +02:00 committed by Miek Gieben
parent 73c6d4de27
commit 39c9f7ed76
3 changed files with 8 additions and 3 deletions

View file

@ -3,3 +3,7 @@
Use `coredns.service` as a systemd service file. It defaults to using a "coredns" user with
a homedir of `/var/lib/coredns` and the binary lives in `/usr/bin` and the config in
`/etc/coredns/Corefile`.
In order to work, the systemd unit needs a user named `coredns`, an handy way to provide
it is to use the `systemd-sysusers` service by installing the `coredns-sysusers.conf` file in the
`sysusers.d` folder (e.g: `/usr/lib/sysusers.d`).

View file

@ -0,0 +1 @@
u coredns - "CoreDNS is a DNS server that chains plugins " /

View file

@ -7,9 +7,9 @@ After=network.target
PermissionsStartOnly=true
LimitNOFILE=1048576
LimitNPROC=512
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
AmbientCapabilities=CAP_NET_BIND_SERVICE
NoNewPrivileges=true
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
AmbientCapabilities=CAP_NET_BIND_SERVICE
NoNewPrivileges=true
User=coredns
WorkingDirectory=~
ExecStart=/usr/bin/coredns -conf=/etc/coredns/Corefile