Home Forums MaraDNS and other support systemd unit for zoneserver Reply To: systemd unit for zoneserver

#79
pillarsdotnet
Participant

Yes, I’m aware of the existence of traditional SysV startup scripts included with MaraDNS.

I’m replacing them, in my environment, with systemd service files. I don’t expect you to adopt my custom installation method nor recommend it for all users.

I just think it notable that /usr/sbin/zoneserver runs fine from the command-line or when launched from /bin/sh or /usr/bin/strace but not when launched directly by systemd.

I wonder if it looks for some environment variable which systemd does not supply by default?

I’ll probably dig through the code myself and figure it out; if I do, I may submit a PR on github.

For now, I’m happy with the following service file:

[Unit]
Description=MaraDNS Zoneserver handles DNS zone transfers and any TCP DNS queries
Documentation=man:zoneserver(8)
Requires=network.target

[Service]
ExecStart=/bin/sh -c '/usr/sbin/zoneserver -f /etc/maradns/mararc'
Restart=always

[Install]
WantedBy=multi-user.target