debian: use shell script to load /etc/authentic2/authentic.conf in systemd service file (#44960)

This commit is contained in:
Benjamin Dauvergne 2020-07-09 09:58:16 +02:00
parent 8b70a93e24
commit 308953a515
4 changed files with 18 additions and 1 deletions

View File

@ -24,6 +24,7 @@ fi
if [ -f /etc/authentic2/db.conf ]; then
. /etc/authentic2/db.conf
fi
if [ -f /etc/authentic2/authentic.conf ]; then
. /etc/authentic2/authentic.conf
fi

View File

@ -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

View File

@ -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 \

15
debian/launch-authentic2.sh vendored Executable file
View File

@ -0,0 +1,15 @@
#!/bin/bash
if [ -f /etc/default/authentic2 ]; then
. /etc/default/authentic2
fi
if [ -f /etc/authentic2/db.conf ]; then
. /etc/authentic2/db.conf
fi
if [ -f /etc/authentic2/authentic.conf ]; then
. /etc/authentic2/authentic.conf
fi
/usr/bin/gunicorn3 "$@"