__matrix_synapse: add support for Ubuntu
This commit is contained in:
parent
fc6764be44
commit
25406ea3a0
2 changed files with 11 additions and 21 deletions
|
@ -8,7 +8,7 @@ case "$os" in
|
|||
synapse_conf_dir=/etc/synapse
|
||||
synapse_service=synapse
|
||||
;;
|
||||
debian)
|
||||
debian|ubuntu)
|
||||
synapse_conf_dir=/etc/matrix-synapse
|
||||
synapse_service=matrix-synapse
|
||||
;;
|
||||
|
|
|
@ -20,10 +20,9 @@
|
|||
|
||||
# OS-specific configuration.
|
||||
os=$(cat "$__global/explorer/os")
|
||||
distribution=$(cat "$__global/explorer/lsb_codename")
|
||||
|
||||
case "$os" in
|
||||
debian)
|
||||
debian|ubuntu)
|
||||
synapse_user=matrix-synapse
|
||||
synapse_pkg=matrix-synapse-py3
|
||||
synapse_service=matrix-synapse
|
||||
|
@ -31,22 +30,13 @@ case "$os" in
|
|||
synapse_conf_dir='/etc/matrix-synapse'
|
||||
synapse_data_dir='/var/lib/matrix-synapse'
|
||||
|
||||
# We use upstream's APT repository in order to stay up-to-date: upstream
|
||||
# moves fast and downstream debian package is necessarily delayed.
|
||||
case "$distribution" in
|
||||
buster|bulleye|bookworm|sid)
|
||||
__apt_key matrix-org \
|
||||
--uri https://packages.matrix.org/debian/matrix-org-archive-keyring.gpg
|
||||
require="__apt_key/matrix-org" __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
|
||||
__apt_key matrix-org \
|
||||
--uri https://packages.matrix.org/debian/matrix-org-archive-keyring.gpg
|
||||
|
||||
require="__apt_key/matrix-org" __apt_source matrix-org \
|
||||
--uri https://packages.matrix.org/debian/ \
|
||||
--component main
|
||||
package_req="__apt_source/matrix-org"
|
||||
;;
|
||||
alpine)
|
||||
synapse_user=synapse
|
||||
|
@ -330,8 +320,8 @@ for directory in $DATA_DIR $LOG_DIR; do
|
|||
--owner $synapse_user
|
||||
done
|
||||
|
||||
# Make dpkg-reconfigure happy on debian systems.
|
||||
if [ "$os" = "debian" ]; then
|
||||
# Make dpkg-reconfigure happy on debian-based systems.
|
||||
if [ "$os" = "debian" ] || [ "$os" = "ubuntu" ]; then
|
||||
require="$synapse_req" __file "$synapse_conf_dir/conf.d/server_name.yaml" \
|
||||
--owner $synapse_user \
|
||||
--source - <<- EOF
|
||||
|
|
Loading…
Reference in a new issue