Debian 11 has renamed the systemd unit for the named service

kristian

Verified User
Joined
Nov 4, 2005
Messages
490
Location
Norway
In Debian 11, the service unit file for bind9 was changed from bind9.service to named.service. The named.service that is included in the bind9 package, sets up an Alias for bind9 so it will still work. The named.service file that DA/CustomBuild installs does not. In the short term, this means that fresh installs on Debian 11, where people expect the service to be called bind9.service will fail (e.g. by setting named_service_override=bind9 in directadmin.conf).

As a reference, here's the named.service file as shipped with bind9 on Debian 11:
Code:
[Unit]
Description=BIND Domain Name Server
Documentation=man:named(8)
After=network.target
Wants=nss-lookup.target
Before=nss-lookup.target

[Service]
EnvironmentFile=-/etc/default/named
ExecStart=/usr/sbin/named -f $OPTIONS
ExecReload=/usr/sbin/rndc reload
ExecStop=/usr/sbin/rndc stop
Restart=on-failure

[Install]
WantedBy=multi-user.target
Alias=bind9.service

And here's the one installed by CustomBuild into /etc/systemd/system/named.service overriding the one supplied by the bind9 package:
Code:
[Unit]
Description=BIND Domain Name Server
Documentation=man:named(8)
After=network.target

[Service]
ExecStart=/usr/sbin/named -f -u bind
ExecReload=/usr/sbin/rndc reload
ExecStop=/usr/sbin/rndc stop

[Install]
WantedBy=multi-user.target

The one supplied by CustomBuild should probably be updated to better match the default in Debian 11, for Debian 11 installs.

This also means that Debian 11 users should stop setting named_service_override in the DirectAdmin config.
 
Back
Top