1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/strut_ynh.git synced 2024-09-03 20:26:33 +02:00

Remove is_public

This commit is contained in:
ericgaspar 2021-05-01 08:29:19 +02:00
parent 18b9ad9b33
commit 5c429eea87
2 changed files with 4 additions and 19 deletions

View file

@ -44,7 +44,6 @@ ynh_script_progression --message="Storing installation settings..." --weight=2
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=is_public --value=$is_public
#================================================= #=================================================
# STANDARD MODIFICATIONS # STANDARD MODIFICATIONS

View file

@ -18,7 +18,6 @@ app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get --app=$app --key=domain) 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)
is_public=$(ynh_app_setting_get --app=$app --key=is_public)
final_path=$(ynh_app_setting_get --app=$app --key=final_path) final_path=$(ynh_app_setting_get --app=$app --key=final_path)
#================================================= #=================================================
@ -32,23 +31,10 @@ upgrade_type=$(ynh_check_app_version_changed)
#================================================= #=================================================
ynh_script_progression --message="Ensuring downward compatibility..." ynh_script_progression --message="Ensuring downward compatibility..."
if [ "${version}" = "20160501-7" ]; then # If final_path doesn't exist, create it
public_site=$(ynh_app_setting_get --app=$app --key=public_site) if [ -z "$final_path" ]; then
# Fix is_public as a boolean value final_path=/var/www/$app
if [ "$public_site" = "Yes" ]; then ynh_app_setting_set --app=$app --key=final_path --value=$final_path
ynh_app_setting_set --app=$app --key=is_public --value=1
is_public=1
elif [ "$public_site" = "No" ]; then
ynh_app_setting_set --app=$app --key=is_public --value=0
is_public=0
fi
ynh_app_setting_delete $app public_site
# If final_path doesn't exist, create it
if [ -z "$final_path" ]; then
final_path=/var/www/$app
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
fi
fi fi
# Cleaning legacy permissions # Cleaning legacy permissions