From 787c3d0a20c453b44eb57e7902d3f9e4ac8e8cac Mon Sep 17 00:00:00 2001 From: Sven Luthi Date: Tue, 25 Nov 2025 10:00:31 +0100 Subject: [PATCH] modified: README.md new file: docs/install-systemd-service.md Fixes #3 --- README.md | 7 +++++-- docs/install-systemd-service.md | 34 +++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 docs/install-systemd-service.md diff --git a/README.md b/README.md index b6a8fcf..323f068 100644 --- a/README.md +++ b/README.md @@ -116,8 +116,11 @@ This guide assumes: 5. Start listener This step runs the DNS endpoint used by bind to configure itself. You may want - to write a service wrapper that runs this in the background. Dont forget to - activate the venv if you do decide to run this service in the background. + to write a service wrapper that runs this in the background. + A guide for setting up a systemd service on Ubuntu is provided by Matt + Kollross [here](docs/install-systemd-service.md). Dont forget to activate + the venv if you do decide to run this service in the background. + Note that `--port 5354` is optional. The listener will bind this port by default. ``` diff --git a/docs/install-systemd-service.md b/docs/install-systemd-service.md new file mode 100644 index 0000000..94e8a11 --- /dev/null +++ b/docs/install-systemd-service.md @@ -0,0 +1,34 @@ +1. Create System Unit file + ``` + cat < /etc/systemd/system/netbox-bind-endpoint.service + [Unit] + Description=Netbox BIND Catalog Endpoing + Documentation=https://github.com/Suraxius/netbox-plugin-bind-provisioner + After=network-online.target + Wants=network-online.target + + [Service] + Type=simple + + User=netbox + Group=netbox + PIDFile=/var/tmp/netbox.pid + WorkingDirectory=/opt/netbox + + ExecStart=/opt/netbox/venv/bin/python3 /opt/netbox/netbox/manage.py bind-transfer-endpoint --port 5354 + + Restart=on-failure + RestartSec=30 + PrivateTmp=true + + [Install] + WantedBy=multi-user.target + EOF + ``` + +2. Enable and start the service + ``` + systemctl enable netbox-bind-endpoint + systemctl start netbox-bind-endpoint + systemctl status netbox-bind-endpoint + ```