__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,23 +30,14 @@ 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
|
||||
;;
|
||||
alpine)
|
||||
synapse_user=synapse
|
||||
synapse_pkg=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