__matrix_synapse: add support for Ubuntu

This commit is contained in:
fnux 2021-11-30 13:32:03 +01:00
parent fc6764be44
commit 25406ea3a0
No known key found for this signature in database
GPG key ID: 4502C902C00A1E12
2 changed files with 11 additions and 21 deletions

View file

@ -8,7 +8,7 @@ case "$os" in
synapse_conf_dir=/etc/synapse synapse_conf_dir=/etc/synapse
synapse_service=synapse synapse_service=synapse
;; ;;
debian) debian|ubuntu)
synapse_conf_dir=/etc/matrix-synapse synapse_conf_dir=/etc/matrix-synapse
synapse_service=matrix-synapse synapse_service=matrix-synapse
;; ;;

View file

@ -20,10 +20,9 @@
# OS-specific configuration. # OS-specific configuration.
os=$(cat "$__global/explorer/os") os=$(cat "$__global/explorer/os")
distribution=$(cat "$__global/explorer/lsb_codename")
case "$os" in case "$os" in
debian) debian|ubuntu)
synapse_user=matrix-synapse synapse_user=matrix-synapse
synapse_pkg=matrix-synapse-py3 synapse_pkg=matrix-synapse-py3
synapse_service=matrix-synapse synapse_service=matrix-synapse
@ -31,22 +30,13 @@ case "$os" in
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'
# We use upstream's APT repository in order to stay up-to-date: upstream __apt_key matrix-org \
# moves fast and downstream debian package is necessarily delayed. --uri https://packages.matrix.org/debian/matrix-org-archive-keyring.gpg
case "$distribution" in
buster|bulleye|bookworm|sid) require="__apt_key/matrix-org" __apt_source matrix-org \
__apt_key matrix-org \ --uri https://packages.matrix.org/debian/ \
--uri https://packages.matrix.org/debian/matrix-org-archive-keyring.gpg --component main
require="__apt_key/matrix-org" __apt_source matrix-org \ package_req="__apt_source/matrix-org"
--uri https://packages.matrix.org/debian/ \
--component main
package_req="__apt_source/matrix-org"
;;
*)
echo "Unknown debian release '$distribution'. Exiting" >&2
exit 1
;;
esac
;; ;;
alpine) alpine)
synapse_user=synapse synapse_user=synapse
@ -330,8 +320,8 @@ for directory in $DATA_DIR $LOG_DIR; do
--owner $synapse_user --owner $synapse_user
done done
# Make dpkg-reconfigure happy on debian systems. # Make dpkg-reconfigure happy on debian-based systems.
if [ "$os" = "debian" ]; then if [ "$os" = "debian" ] || [ "$os" = "ubuntu" ]; then
require="$synapse_req" __file "$synapse_conf_dir/conf.d/server_name.yaml" \ require="$synapse_req" __file "$synapse_conf_dir/conf.d/server_name.yaml" \
--owner $synapse_user \ --owner $synapse_user \
--source - <<- EOF --source - <<- EOF