mirror of
https://github.com/YunoHost-Apps/jitsi_ynh.git
synced 2024-09-03 19:35:57 +02:00
de61d69b31
* add max video member parameter to set max memory usage * add max memory usage * add VIDEOBRIDGE_MAX_MEMORY config * Update manifest.json * Update manifest.json * add max_memory parameter * add max memory unit * add max memory unit * add max member test value * Update manifest.json * Update manifest.json * Update jitsi-jicofo-config * Update jitsi-videobridge.config * Update install * Update install * Update install * Update upgrade * Update restore * Create config_panel.toml * Update config_panel.toml * Update config_panel.toml * fix bug * Create config * Update config_panel.toml * Update config * fix cannot restart service "" * Update config * change max users to max memory for better undertand * change max user to max memory for better understand * Update config_panel.toml edit help text * Update config * max_memory not needed during restore * remove max_memory question during install * default max_memory reduced * Cleanup * adding max_memory informations * Auto-update README * typo Co-authored-by: yalh76 <yalh@yahoo.com> Co-authored-by: yunohost-bot <yunohost@yunohost.org>
88 lines
2.8 KiB
Bash
88 lines
2.8 KiB
Bash
#!/bin/bash
|
|
|
|
#=================================================
|
|
# GENERIC STARTING
|
|
#=================================================
|
|
# IMPORT GENERIC HELPERS
|
|
#=================================================
|
|
|
|
source _common.sh
|
|
source /usr/share/yunohost/helpers
|
|
|
|
ynh_abort_if_errors
|
|
|
|
#=================================================
|
|
# RETRIEVE ARGUMENTS
|
|
#=================================================
|
|
|
|
|
|
#=================================================
|
|
# SPECIFIC GETTERS FOR TOML SHORT KEY
|
|
#=================================================
|
|
|
|
get__max_memory(){
|
|
local max_memory=$(ynh_app_setting_get --app=$app --key=max_memory)
|
|
|
|
# If max_memory doesn't exist, create it and set to default 75 mb value
|
|
if [ -z "$max_memory" ]; then
|
|
max_memory=75
|
|
ynh_app_setting_set --app=$app --key=max_memory --value=$max_memory
|
|
fi
|
|
|
|
cat << EOF
|
|
value: $max_memory
|
|
EOF
|
|
}
|
|
|
|
#=================================================
|
|
# SPECIFIC VALIDATORS FOR TOML SHORT KEYS
|
|
#=================================================
|
|
|
|
#=================================================
|
|
# SPECIFIC SETTERS FOR TOML SHORT KEYS
|
|
#=================================================
|
|
|
|
set__max_memory(){
|
|
|
|
#=================================================
|
|
# LOAD SETTINGS
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Loading installation settings..."
|
|
|
|
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
|
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
|
|
|
focus_user=$(ynh_app_setting_get --app=$app --key=focus_user)
|
|
focus_password=$(ynh_app_setting_get --app=$app --key=focus_password)
|
|
focus_secret=$(ynh_app_setting_get --app=$app --key=focus_secret)
|
|
|
|
videobridge_user=$(ynh_app_setting_get --app=$app --key=videobridge_user)
|
|
videobridge_secret=$(ynh_app_setting_get --app=$app --key=videobridge_secret)
|
|
|
|
port=$(ynh_app_setting_get --app=$app --key=port)
|
|
port_videobridge=$(ynh_app_setting_get --app=$app --key=port_videobridge)
|
|
port_component=$(ynh_app_setting_get --app=$app --key=port_component)
|
|
|
|
#=================================================
|
|
# SET SETTINGS
|
|
#=================================================
|
|
|
|
ynh_app_setting_set --app=$app --key=max_memory --value=$max_memory
|
|
|
|
#=================================================
|
|
# UPDATE CONFIG FILES
|
|
#=================================================
|
|
|
|
ynh_add_config --template="../conf/jitsi-videobridge.config" --destination="/etc/$app/videobridge/config"
|
|
ynh_add_config --template="../conf/jitsi-jicofo-config" --destination="/etc/$app/jicofo/config"
|
|
|
|
ynh_script_progression -l --message="Configuration of $app updated"
|
|
}
|
|
|
|
#=================================================
|
|
# GENERIC FINALIZATION
|
|
#=================================================
|
|
|
|
ynh_app_config_run $1
|