From: Michael Tremer Date: Wed, 7 Jan 2026 13:38:26 +0000 (+0000) Subject: api: Add a systemd unit file for the API service X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=efcc6246290bcabb6144c13d3d3d271297c3945a;p=dbl.git api: Add a systemd unit file for the API service Signed-off-by: Michael Tremer --- diff --git a/Makefile.am b/Makefile.am index ce0ecd2..ca37dd9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -28,6 +28,8 @@ AUTOMAKE_OPTIONS = color-tests # keep itermediate files .SECONDARY: +systemdsystemunitdir = $(prefix)/lib/systemd/system + CLEANFILES = EXTRA_DIST = @@ -70,6 +72,9 @@ dist_pkgpython_api_PYTHON = \ pkgpython_apidir = $(pkgpythondir)/api +dist_systemdsystemunit_DATA = \ + src/systemd/dnsbl-api.service + # ------------------------------------------------------------------------------ CLEANFILES += \ diff --git a/src/systemd/dnsbl-api.service b/src/systemd/dnsbl-api.service new file mode 100644 index 0000000..04fe5b4 --- /dev/null +++ b/src/systemd/dnsbl-api.service @@ -0,0 +1,11 @@ +[Unit] +Description=IPFire DNSBL API +After=network.target postgresql.service +Requires=postgresql.service + +[Service] +ExecStart=/usr/bin/uvicorn dnsbl.api:app +User=nobody + +[Install] +WantedBy=multi-user.target