Compare commits
2 commits
2038244ec4
...
fc6764be44
Author | SHA1 | Date | |
---|---|---|---|
fc6764be44 | |||
18f02e24aa |
2 changed files with 15 additions and 35 deletions
|
@ -25,29 +25,22 @@ distribution=$(cat "$__global/explorer/lsb_codename")
|
||||||
case "$os" in
|
case "$os" in
|
||||||
debian)
|
debian)
|
||||||
synapse_user=matrix-synapse
|
synapse_user=matrix-synapse
|
||||||
synapse_pkg=matrix-synapse
|
synapse_pkg=matrix-synapse-py3
|
||||||
synapse_service=matrix-synapse
|
synapse_service=matrix-synapse
|
||||||
ldap_auth_provider_pkg=matrix-synapse-ldap3
|
ldap_auth_provider_pkg=matrix-synapse-ldap3
|
||||||
synapse_conf_dir='/etc/matrix-synapse'
|
synapse_conf_dir='/etc/matrix-synapse'
|
||||||
synapse_data_dir='/var/lib/matrix-synapse'
|
synapse_data_dir='/var/lib/matrix-synapse'
|
||||||
|
|
||||||
# See https://packages.debian.org/bullseye/matrix-synapse for state of
|
# We use upstream's APT repository in order to stay up-to-date: upstream
|
||||||
# synapse packaging in debian.
|
# moves fast and downstream debian package is necessarily delayed.
|
||||||
case "$distribution" in
|
case "$distribution" in
|
||||||
stretch)
|
buster|bulleye|bookworm|sid)
|
||||||
echo "The matrix-synapse package in debian stretch is outdated and unusable." >&2
|
__apt_key matrix-org \
|
||||||
exit 1
|
--uri https://packages.matrix.org/debian/matrix-org-archive-keyring.gpg
|
||||||
;;
|
require="__apt_key/matrix-org" __apt_source matrix-org \
|
||||||
buster)
|
--uri https://packages.matrix.org/debian/ \
|
||||||
# Enable debian-backports for debian Buster, as the 'stable'
|
--component main
|
||||||
# matrix-synapse package is ways too old (< 1.0).
|
package_req="__apt_source/matrix-org"
|
||||||
apt_target_release=buster-backports
|
|
||||||
__apt_backports
|
|
||||||
;;
|
|
||||||
bullseye|sid)
|
|
||||||
# As of writting (2021-02), the default matrix-synapse of those
|
|
||||||
# release is perfectly usable.
|
|
||||||
:
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Unknown debian release '$distribution'. Exiting" >&2
|
echo "Unknown debian release '$distribution'. Exiting" >&2
|
||||||
|
@ -309,25 +302,12 @@ case "$DATABASE_ENGINE" in
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
# Install OS packages. We have a bit of boilerplate to handle the debian
|
# Install OS packages.
|
||||||
# backports situation.
|
require="$package_req" __package "$synapse_pkg"
|
||||||
synapse_req=
|
synapse_req="__package/$synapse_pkg"
|
||||||
if [ -n "$apt_target_release" ]; then
|
|
||||||
require="__apt_backports" __package_apt "$synapse_pkg" \
|
|
||||||
--target-release "$apt_target_release"
|
|
||||||
synapse_req="__package_apt/$synapse_pkg"
|
|
||||||
else
|
|
||||||
__package "$synapse_pkg"
|
|
||||||
synapse_req="__package/$synapse_pkg"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$ENABLE_LDAP_AUTH" ]; then
|
if [ -n "$ENABLE_LDAP_AUTH" ]; then
|
||||||
if [ -n "$apt_target_release" ]; then
|
require="$package_req" __package "$ldap_auth_provider_pkg"
|
||||||
require="__package_apt/$synapse_pkg" __package_apt "$ldap_auth_provider_pkg" \
|
|
||||||
--target-release "$apt_target_release"
|
|
||||||
else
|
|
||||||
__package "$ldap_auth_provider_pkg"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Generate and deploy configuration files.
|
# Generate and deploy configuration files.
|
||||||
|
|
|
@ -15,7 +15,7 @@ NotifyAccess=main
|
||||||
User=matrix-synapse
|
User=matrix-synapse
|
||||||
WorkingDirectory=/var/lib/matrix-synapse
|
WorkingDirectory=/var/lib/matrix-synapse
|
||||||
EnvironmentFile=/etc/default/matrix-synapse
|
EnvironmentFile=/etc/default/matrix-synapse
|
||||||
ExecStart=/usr/bin/python3 -m synapse.app.generic_worker --config-path=/etc/matrix-synapse/homeserver.yaml --config-path=/etc/matrix-synapse/conf.d/ --config-path=/etc/matrix-synapse/workers/%i.yaml
|
ExecStart=/opt/venvs/matrix-synapse/bin/python -m synapse.app.generic_worker --config-path=/etc/matrix-synapse/homeserver.yaml --config-path=/etc/matrix-synapse/conf.d/ --config-path=/etc/matrix-synapse/workers/%i.yaml
|
||||||
ExecReload=/bin/kill -HUP $MAINPID
|
ExecReload=/bin/kill -HUP $MAINPID
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
RestartSec=3
|
RestartSec=3
|
||||||
|
|
Loading…
Reference in a new issue