From 1ee58699a5da7a1340c56472bf5a86ae5b1a2933 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Thu, 9 Jul 2020 09:58:16 +0200 Subject: [PATCH] debian: use shell script to load /etc/authentic2/authentic.conf in systemd service file (#44960) --- debian/authentic2.install | 1 + debian/authentic2.service | 2 +- debian/launch-authentic2.sh | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100755 debian/launch-authentic2.sh diff --git a/debian/authentic2.install b/debian/authentic2.install index 6a8d182d..a608b265 100644 --- a/debian/authentic2.install +++ b/debian/authentic2.install @@ -2,3 +2,4 @@ debian/conf/authentic.conf /etc/authentic2 debian/authentic2-manage /usr/bin debian/conf/nginx-example.conf /usr/share/authentic2 debian/debian_config.py /usr/lib/authentic2 +debian/launch-authentic2.sh /usr/lib/authentic2 diff --git a/debian/authentic2.service b/debian/authentic2.service index be697b0f..c85309d7 100644 --- a/debian/authentic2.service +++ b/debian/authentic2.service @@ -10,7 +10,7 @@ User=authentic2 Group=authentic2 ExecStartPre=/usr/bin/authentic2-manage migrate --noinput ExecStartPre=/usr/bin/authentic2-manage collectstatic --noinput -ExecStart=/usr/bin/gunicorn3 \ +ExecStart=/usr/lib/authentic2/launch-authentic2.sh \ --bind unix:/run/%p/%p.sock \ --worker-class=sync \ --workers 5 \ diff --git a/debian/launch-authentic2.sh b/debian/launch-authentic2.sh new file mode 100755 index 00000000..505b0fef --- /dev/null +++ b/debian/launch-authentic2.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +. /etc/authentic2/authentic.conf + +/usr/bin/gunicorn3 "$@" -- 2.26.2