Skip to content

Commit

Permalink
unbound: Enable systemd support and install systemd units
Browse files Browse the repository at this point in the history
Install systemd socket and service unit.

`--enable-systemd` is needed, as otherwise [the service unit times
out][1].

Also, as we do not store the trust anchor in `/etc/unbound`, RUNDIR in
Unbound’s terms, add `/var/unbound` to the unit’s read/write path.

This does not have an effect yet, as mxtools installs
`/etc/systemd/system/unbound.service`.

For socket activation `use-systemd: yes` has to be set in the
configuration file.

[1]: https://github.com/NLnetLabs/unbound/issues/56
  • Loading branch information
pmenzel committed May 4, 2021
1 parent d285073 commit 232d70a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions unbound.be0
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ SRCURL[0]="https://www.unbound.net/downloads/unbound-${PKGVERSION}.tar.gz"
mee_configure() {
bee_configure \
--disable-static \
--enable-systemd \
--with-pidfile="/run/unbound.pid" \
--with-rootkey-file="/var/unbound/root.key"
}
Expand All @@ -73,6 +74,8 @@ mee_build() {

mee_install_post() {
start_cmd mv ${D}/etc/unbound/unbound.conf{,.sample}
start_cmd install -m 644 -D -t ${D}/lib/systemd/system ${B}/contrib/unbound.{service,socket}
start_cmd sed -i '/^ReadWritePaths=/ s,$, /var/unbound,' ${B}/contrib/unbound.service

start_cmd install -o unbound -m 755 -d ${D}/var/unbound
}
Expand Down

0 comments on commit 232d70a

Please sign in to comment.