1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/synapse_ynh.git synced 2024-09-03 20:26:38 +02:00

matrix.to

This commit is contained in:
Gredin67 2023-01-10 00:20:52 +01:00 committed by GitHub
parent 24044b0ecd
commit 5dbf9f89dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -173,6 +173,7 @@ if ! grep -q "$final_path" /etc/passwd; then
sed --in-place -r "s@matrix-$app\:x\:([[:digit:]]+\:[[:digit:]]+)\:\:/.*/matrix-$app\:/usr/sbin/nologin@matrix-$app\:x\:\1\:\:$final_path\:/usr/sbin/nologin@g" /etc/passwd
fi
#=================================================
# MIGRATION 7 : Working config panel v1
#=================================================
@ -181,18 +182,23 @@ if [ -z $allow_public_rooms ]; then
allow_public_rooms="false"
fi
# Get app name of first Element Instance
element_instance="element"
element_domain=$(ynh_app_setting_get --app $element_instance --key domain)
element_path=$(ynh_app_setting_get --app $element_instance --key path)
# SET STANDARD SETTINGS FROM DEFAULT CONFIG
# Get app name of first Element Instance
if [ -z "$element_ynh_url" ]
then
element_ynh_url="https://"+element_domain+element_path
ynh_app_setting_set --app=$app --key=element_ynh_url --value=$element_ynh_url
element_instance="element"
element_domain=$(ynh_app_setting_get --app $element_instance --key domain)
element_path=$(ynh_app_setting_get --app $element_instance --key path)
if [ -z "$element_domain" ]; then
element_ynh_url="https://matrix.to/"
else
element_ynh_url="https://"+element_domain+element_path
fi
fi
ynh_app_setting_set --app=$app --key=element_ynh_url --value=$element_ynh_url
if [ -z "$allow_public_rooms_without_auth" ]
then
allow_public_rooms_without_auth=allow_public_rooms