I introduced RefuseManualStart=true last year when writing the initial
systemd unit file for kresd. I did this because i didn't want to
start running the daemon if no one was going to talk to it.
I'm no longer convinced that this directive has a good justification.
While i think that there is no need to activate the service without
socket activation, i think preventing manual invocation is actively
harmful (admins will reflexively do "systemctl restart kresd" just
like they do "systemctl restart apache2" and it's jarring to have it
rejected).
A distributor who wants to (by default) delay kresd startup until it
is accessed can ship the preset file included here, but leave the
*.socket units enabled by default.
--- /dev/null
+# kresd is fully socket-activated, so it does not need to be enabled
+# in the systemd sense (automatically started at boot). The
+# associated sockets *are* enabled however, so the kresd service will
+# be started as soon as anything connects to one of the listening
+# sockets.
+disable kresd.service
initialization via the interface supported by
sd_listen_fds_with_names(3)).
+Distributors of systems using systemd may wish to place
+./90-kresd.preset in /lib/systemd/systemd-preset/90-kresd.preset if
+they want to delay daemon launch until it is accessed. (see
+systemd.preset(5)).
+
When run in this configuration:
* it will be run under a non-privileged user, which means it will not
[Unit]
Description=Knot DNS Resolver daemon
Documentation=man:kresd(8)
-## This is a socket-activated service:
-RefuseManualStart=true
[Service]
Type=notify