From 548e1c94926df108385850142b7d1b40191db30f Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Wed, 28 Dec 2022 06:47:06 +0100 Subject: [PATCH] postinst - fixed service file --- DEBIAN/postinst | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/DEBIAN/postinst b/DEBIAN/postinst index 7562e31..ea81cfa 100644 --- a/DEBIAN/postinst +++ b/DEBIAN/postinst @@ -9,18 +9,19 @@ After=network.target [Service] User=www-data Group=www-data +AmbientCapabilities=CAP_NET_BIND_SERVICE +EnvironmentFile=/etc/fastapi-dls/env WorkingDirectory=/usr/share/fastapi-dls -EnvironmentFile=/etc/fastapi-dls.env -ExecStart=uvicorn main:app \ - --env-file /etc/fastapi-dls.env \ - --host $DLS_URL --port $DLS_PORT \ - --app-dir /usr/share/fastapi-dls/app \ - --ssl-keyfile /etc/fastapi-dls/webserver.key \ - --ssl-certfile /opt/fastapi-dls/webserver.crt \ +ExecStart=uvicorn main:app \\ + --env-file /etc/fastapi-dls/env \\ + --host \$DLS_URL --port \$DLS_PORT \\ + --app-dir /usr/share/fastapi-dls/app \\ + --ssl-keyfile /etc/fastapi-dls/webserver.key \\ + --ssl-certfile /opt/fastapi-dls/webserver.crt \\ --proxy-headers Restart=always KillSignal=SIGQUIT -Type=notify +Type=simple StandardError=syslog NotifyAccess=all