mirror of
https://github.com/YunoHost-Apps/element_ynh.git
synced 2024-09-03 18:36:08 +02:00
Rework config pannel to use template instead of config edit
Edit config has limitation like changing the config file from upstream later and we lost user preferance in the yunohost app settings
This commit is contained in:
parent
9d8c970d1c
commit
b11044de1a
4 changed files with 10 additions and 12 deletions
|
@ -15,8 +15,6 @@ name.fr = "Configuration d'Element"
|
|||
default = "matrix.org"
|
||||
help.en = "Define Matrix default home server address."
|
||||
help.fr = "Définir l'adresse du serveur par défaut de Matrix."
|
||||
bind = "base_url:__INSTALL_DIR__/config.json"
|
||||
|
||||
|
||||
[main.config.login_for_welcome]
|
||||
ask.en = "Display login as welcome page"
|
||||
|
@ -26,4 +24,3 @@ name.fr = "Configuration d'Element"
|
|||
no = false
|
||||
help.en = "When true, the app will use the login form as a welcome page instead of the welcome page itself. This disables use of welcome_url and all welcome page functionality."
|
||||
help.fr = "Quand l'option est sélectionnée, l'application utilisera le formulaire de connexion comme page d'accueil au lieu de la page d'accueil elle-même. Cela désactive l'utilisation de welcome_url et de toutes les fonctionnalités de la page d'accueil."
|
||||
bind = "login_for_welcome:__INSTALL_DIR__/config.json"
|
||||
|
|
|
@ -8,6 +8,13 @@
|
|||
# PERSONAL HELPERS
|
||||
#=================================================
|
||||
|
||||
configure_element()
|
||||
{
|
||||
ynh_add_config --template="config.json" --destination="$install_dir/config.json"
|
||||
chmod -R u=rwX,g=rX,o= "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
}
|
||||
|
||||
#=================================================
|
||||
# EXPERIMENTAL HELPERS
|
||||
#=================================================
|
||||
|
|
|
@ -37,10 +37,7 @@ ynh_add_nginx_config
|
|||
#=================================================
|
||||
ynh_script_progression --message="Adding a configuration file..." --weight=1
|
||||
|
||||
ynh_add_config --template="../conf/config.json" --destination="$install_dir/config.json"
|
||||
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
configure_element
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
|
@ -52,12 +52,9 @@ chown -R $app:www-data "$install_dir"
|
|||
#=================================================
|
||||
# ADD A CONFIGURATION
|
||||
#=================================================
|
||||
#ynh_script_progression --message="Adding a configuration file..." --weight=1
|
||||
ynh_script_progression --message="Adding a configuration file..." --weight=1
|
||||
|
||||
#ynh_add_config --template="../conf/config.json" --destination="$install_dir/config.json"
|
||||
|
||||
#chmod -R o-rwx "$install_dir"
|
||||
#chown -R $app:www-data "$install_dir"
|
||||
configure_element
|
||||
|
||||
#=================================================
|
||||
# REAPPLY SYSTEM CONFIGURATIONS
|
||||
|
|
Loading…
Add table
Reference in a new issue