[Pkg-dns-devel] Bug#826241: Bug#826241: unbound: Provide $named facility under systemd

Michael Biebl biebl at debian.org
Sat Jun 4 01:11:54 BST 2016


Am 04.06.2016 um 01:14 schrieb Michael Biebl:
> That aside, maybe we still find a nicer solution for this.

I think I have a solution which is reasonable clean.
I've split the service in two, in unbound.service and
unbound-resolvconf.service. The latter is bound to unbound.service via
PartOf=unbound.service.

So whenever unbound.service is stopped/started, that request is
forwarded to unbound-resolvconf.service without blocking unbound.service

During boot, unbound-resolvconf.service is started after unbound.service
via an explicit ordering.

Enjoy,
Michael


-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
-------------- next part --------------
[Unit]
Description=Unbound DNS server
After=network.target
Before=nss-lookup.target
Wants=nss-lookup.target

[Service]
Type=simple
Restart=on-failure

EnvironmentFile=-/etc/default/unbound

ExecStartPre=-/usr/lib/unbound/package-helper chroot_setup
ExecStartPre=-/usr/lib/unbound/package-helper root_trust_anchor_update

ExecStart=/usr/sbin/unbound -d $DAEMON_OPTS

ExecReload=/usr/sbin/unbound-control reload

[Install]
WantedBy=multi-user.target
-------------- next part --------------
[Unit]
Description=Unbound DNS server via resolvconf 
After=unbound.service
PartOf=unbound.service
ConditionFileIsExcutable=/sbin/resolvconf

[Service]
Type=oneshot
ExecStart=/usr/lib/unbound/package-helper resolvconf_start
ExecStop=/usr/lib/unbound/package-helper resolvconf_stop
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20160604/8289483c/attachment-0002.sig>


More information about the Pkg-systemd-maintainers mailing list