mirror of
https://github.com/YunoHost-Apps/gotosocial_ynh.git
synced 2024-09-03 19:16:06 +02:00
apply values from problem key during upgrade
This commit is contained in:
parent
bce4917b2d
commit
5e8c883cb7
1 changed files with 26 additions and 0 deletions
|
@ -264,6 +264,32 @@ then
|
||||||
ynh_app_setting_set --app="$app" --key=smtp_disclose_recipients --value="$smtp_disclose_recipients"
|
ynh_app_setting_set --app="$app" --key=smtp_disclose_recipients --value="$smtp_disclose_recipients"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Upgrade from <0.8.0~ynh3:
|
||||||
|
if ynh_compare_current_package_version --comparison lt --version 0.8.0~ynh3
|
||||||
|
then
|
||||||
|
# get settings from problem key
|
||||||
|
allow_custom_css=$(ynh_app_setting_get --app="$app" --key=allow_custom_css)
|
||||||
|
approval_required=$(ynh_app_setting_get --app="$app" --key=approval_required)
|
||||||
|
reason_required=$(ynh_app_setting_get --app="$app" --key=reason_required)
|
||||||
|
registration_open=$(ynh_app_setting_get --app="$app" --key=registration_open)
|
||||||
|
# apply setting to correct key if set on old key
|
||||||
|
if [ -n "$allow_custom_css" ]
|
||||||
|
then
|
||||||
|
ynh_app_setting_set --app="$app" --key=accounts_allow_custom_css --value="allow_custom_css"
|
||||||
|
fi
|
||||||
|
if [ -n "$approval_required" ]
|
||||||
|
then
|
||||||
|
ynh_app_setting_set --app="$app" --key=accounts_approval_required --value="approval_required"
|
||||||
|
fi
|
||||||
|
if [ -n "$reason_required" ]
|
||||||
|
then
|
||||||
|
ynh_app_setting_set --app="$app" --key=accounts_reason_required --value="reason_required"
|
||||||
|
fi
|
||||||
|
if [ -n "$registration_open" ]
|
||||||
|
then
|
||||||
|
ynh_app_setting_set --app="$app" --key=accounts_registration_open --value="registration_open"
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE DEDICATED USER
|
# CREATE DEDICATED USER
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue