mirror of
https://github.com/YunoHost-Apps/element_ynh.git
synced 2024-09-03 18:36:08 +02:00
Fix
This commit is contained in:
parent
c90f078a4a
commit
bb02467958
3 changed files with 3 additions and 33 deletions
|
@ -8,17 +8,6 @@ name = "Element configuration"
|
||||||
|
|
||||||
[main.config.default_home_server]
|
[main.config.default_home_server]
|
||||||
ask = "Choose a home server"
|
ask = "Choose a home server"
|
||||||
type = "url"
|
type = "string"
|
||||||
default = "https://matrix.org"
|
default = "matrix-client.matrix.org"
|
||||||
bind = "__FINALPATH__/config.json"
|
|
||||||
|
|
||||||
[main.config.enable_labs]
|
|
||||||
ask = "Enable labs settings"
|
|
||||||
type = "boolean"
|
|
||||||
bind = "__FINALPATH__/config.json"
|
|
||||||
|
|
||||||
[main.config.default_theme]
|
|
||||||
ask = "Choose a theme"
|
|
||||||
type = "select"
|
|
||||||
choices = ["light", "dark"]
|
|
||||||
bind = "__FINALPATH__/config.json"
|
bind = "__FINALPATH__/config.json"
|
||||||
|
|
|
@ -28,9 +28,6 @@ default_home_server=$YNH_APP_ARG_DEFAULT_HOME_SERVER
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
enable_labs="1"
|
|
||||||
default_theme="light"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -50,8 +47,6 @@ ynh_script_progression --message="Storing installation settings..." --weight=1
|
||||||
ynh_app_setting_set --app=$app --key=domain --value=$domain
|
ynh_app_setting_set --app=$app --key=domain --value=$domain
|
||||||
ynh_app_setting_set --app=$app --key=path --value=$path_url
|
ynh_app_setting_set --app=$app --key=path --value=$path_url
|
||||||
ynh_app_setting_set --app=$app --key=default_home_server --value=$default_home_server
|
ynh_app_setting_set --app=$app --key=default_home_server --value=$default_home_server
|
||||||
ynh_app_setting_set --app=$app --key=enable_labs --value=$enable_labs
|
|
||||||
ynh_app_setting_set --app=$app --key=default_theme --value=$default_theme
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE DEDICATED USER
|
# CREATE DEDICATED USER
|
||||||
|
|
|
@ -20,8 +20,6 @@ domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||||
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
default_home_server=$(ynh_app_setting_get --app=$app --key=default_home_server)
|
default_home_server=$(ynh_app_setting_get --app=$app --key=default_home_server)
|
||||||
enable_labs=$(ynh_app_setting_get --app=$app --key=enable_labs)
|
|
||||||
default_theme=$(ynh_app_setting_get --app=$app --key=default_theme)
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CHECK VERSION
|
# CHECK VERSION
|
||||||
|
@ -50,22 +48,10 @@ ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
|
||||||
|
|
||||||
# If default_home_server doesn't exist, create it
|
# If default_home_server doesn't exist, create it
|
||||||
if [ -z "$default_home_server" ]; then
|
if [ -z "$default_home_server" ]; then
|
||||||
default_home_server="https://matrix.org"
|
default_home_server="matrix-client.matrix.org"
|
||||||
ynh_app_setting_set --app=$app --key=default_home_server --value=$default_home_server
|
ynh_app_setting_set --app=$app --key=default_home_server --value=$default_home_server
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If enable_labs doesn't exist, create it
|
|
||||||
if [ -z "$enable_labs" ]; then
|
|
||||||
enable_labs="1"
|
|
||||||
ynh_app_setting_set --app=$app --key=enable_labs --value=$enable_labs
|
|
||||||
fi
|
|
||||||
|
|
||||||
# If default_theme doesn't exist, create it
|
|
||||||
if [ -z "$default_theme" ]; then
|
|
||||||
default_theme="light"
|
|
||||||
ynh_app_setting_set --app=$app --key=default_theme --value=$default_theme
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Cleaning legacy permissions
|
# Cleaning legacy permissions
|
||||||
if ynh_legacy_permissions_exists; then
|
if ynh_legacy_permissions_exists; then
|
||||||
ynh_legacy_permissions_delete_all
|
ynh_legacy_permissions_delete_all
|
||||||
|
|
Loading…
Add table
Reference in a new issue