Skip to content

Instantly share code, notes, and snippets.

@lgreenlee
Last active January 25, 2022 01:19
Show Gist options
  • Save lgreenlee/54c86072fe68b0369999 to your computer and use it in GitHub Desktop.
Save lgreenlee/54c86072fe68b0369999 to your computer and use it in GitHub Desktop.
TinyDNS/DJBDNS systemd service configuration for Ubuntu
[Unit]
Description=A DNS server daemon
Documentation=man:tinydns(8)
Requires=network.target
After=network.target
[Service]
Restart=always
PIDFile=/var/run/tinydns.pid
ExecStart=/etc/tinydns/run
WorkingDirectory=/etc/tinydns
[Install]
WantedBy=multi-user.target
@kaimast
Copy link

kaimast commented Dec 14, 2017

Needed to do the same thing as muelli when using the binary from the djbdns package in Ubuntu.

@siemer
Copy link

siemer commented Jan 20, 2022

I run the old dbndns Debian package and I have /etc/tinydns/run taking care of IP, ROOT, GID and UID already.

@siemer
Copy link

siemer commented Jan 22, 2022

I mean... I have not seen the run script, but PIDFile is likely wrong. And definitively not needed.

@siemer
Copy link

siemer commented Jan 25, 2022

@muelli Your UID and GID variables are dangerously wrong: tinydns does not complain, but will not drop root privileges. They should be filled with integers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment