mirror of
https://github.com/YunoHost-Apps/synapse-admin_ynh.git
synced 2024-09-03 20:26:34 +02:00
Handle upgrade with synapse_app setting
This commit is contained in:
parent
aec22ac9e4
commit
a7ff23c692
1 changed files with 9 additions and 5 deletions
|
@ -22,10 +22,6 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
port=$(ynh_app_setting_get --app=$app --key=port)
|
port=$(ynh_app_setting_get --app=$app --key=port)
|
||||||
synapse_app=$(ynh_app_setting_get --app=$app --key=synapse_app)
|
synapse_app=$(ynh_app_setting_get --app=$app --key=synapse_app)
|
||||||
|
|
||||||
# Reload Synapse's settings, in case of they changed
|
|
||||||
synapse_domain=$(ynh_app_setting_get --app=$synapse_app --key=domain)
|
|
||||||
synapse_port=$(ynh_app_setting_get --app=$synapse_app --key=synapse_port)
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CHECK VERSION
|
# CHECK VERSION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -62,7 +58,15 @@ if ynh_legacy_permissions_exists; then
|
||||||
ynh_app_setting_delete --app=$app --key=is_public
|
ynh_app_setting_delete --app=$app --key=is_public
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Store Synapse's settings, in case of they changed
|
# If synapse_app doesn't exist, create it and assume it is `synapse`
|
||||||
|
if [ -z "$synapse_app" ]; then
|
||||||
|
synapse_app="synapse"
|
||||||
|
ynh_app_setting_set --app=$app --key=synapse_app --value=$synapse_app
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Reload and store Synapse's settings, in case of they changed
|
||||||
|
synapse_domain=$(ynh_app_setting_get --app=$synapse_app --key=domain)
|
||||||
|
synapse_port=$(ynh_app_setting_get --app=$synapse_app --key=synapse_port)
|
||||||
ynh_app_setting_set --app=$app --key=synapse_domain --value=$synapse_domain
|
ynh_app_setting_set --app=$app --key=synapse_domain --value=$synapse_domain
|
||||||
ynh_app_setting_set --app=$app --key=synapse_port --value=$synapse_port
|
ynh_app_setting_set --app=$app --key=synapse_port --value=$synapse_port
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue