diff --git a/systemd/README.md b/systemd/README.md index 3cc7c9b..1998213 100644 --- a/systemd/README.md +++ b/systemd/README.md @@ -4,6 +4,9 @@ Use `coredns.service` as a systemd service file. It defaults to using a "coredns 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`). +In order to work, you need to do following jobs: + +- Put `coredns` binary in `/usr/bin` +- Put `Corefile` at `/etc/coredns/Corefile` +- Put `coredns-sysusers.conf` in `/usr/lib/sysusers.d` +- Put `coredns-tmpfiles.conf` in `/usr/lib/tmpfiles.d` diff --git a/systemd/coredns-sysusers.conf b/systemd/coredns-sysusers.conf index 4206b12..8bdc16c 100644 --- a/systemd/coredns-sysusers.conf +++ b/systemd/coredns-sysusers.conf @@ -1 +1 @@ -u coredns - "CoreDNS is a DNS server that chains plugins " / +u coredns - "CoreDNS is a DNS server that chains plugins" /var/lib/coredns diff --git a/systemd/coredns-tmpfiles.conf b/systemd/coredns-tmpfiles.conf new file mode 100644 index 0000000..9f7c82a --- /dev/null +++ b/systemd/coredns-tmpfiles.conf @@ -0,0 +1 @@ +d /var/lib/coredns 0755 coredns coredns -