mirror of
https://github.com/YunoHost-Apps/abantecart_ynh.git
synced 2024-09-03 18:06:16 +02:00
fix
This commit is contained in:
parent
0ca53b7cad
commit
edfbb4127a
4 changed files with 8 additions and 7 deletions
|
@ -12,7 +12,7 @@
|
|||
setup_private=1
|
||||
setup_public=1
|
||||
upgrade=1
|
||||
#upgrade=1 from_commit=CommitHash
|
||||
upgrade=1 from_commit=cbd5478814e97cbfd61de51702bea640fffce0e6
|
||||
backup_restore=1
|
||||
multi_instance=0
|
||||
change_url=0
|
||||
|
|
|
@ -29,7 +29,7 @@ phpversion=$YNH_PHP_VERSION
|
|||
email=$(ynh_user_get_info --username=$admin --key=mail)
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
internal_version="$(ynh_app_upstream_version)~ynh$(ynh_app_package_version)"
|
||||
src_version=$(ynh_app_upstream_version)
|
||||
|
||||
#=================================================
|
||||
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
||||
|
@ -51,7 +51,7 @@ 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=final_path --value=$final_path
|
||||
ynh_app_setting_set --app=$app --key=admin --value=$admin
|
||||
ynh_app_setting_set --app=$app --key=internal_version --value=$internal_version
|
||||
ynh_app_setting_set --app=$app --key=src_version --value=$src_version
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
|
|
|
@ -21,7 +21,7 @@ path_url=$(ynh_app_setting_get --app=$app --key=path)
|
|||
admin=$(ynh_app_setting_get --app=$app --key=admin)
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||
internal_version=$(ynh_app_setting_get --app=$app --key=internal_version)
|
||||
src_version=$(ynh_app_setting_get --app=$app --key=src_version)
|
||||
|
||||
phpversion=$YNH_PHP_VERSION
|
||||
|
||||
|
@ -102,14 +102,15 @@ chown -R $app:www-data "$final_path"
|
|||
ynh_script_progression --message="Upgrading MySQL configuration..." --weight=1
|
||||
|
||||
# Update MySQL entries
|
||||
upgrade_mysql_dir=../sources/mysqlpatch/$internal_version.sql
|
||||
upgrade_mysql_dir="../sources/patches/mysql/from_$src_version.sql"
|
||||
|
||||
if [ -d "$upgrade_mysql_dir" ]; then
|
||||
ynh_mysql_execute_file_as_root --file=$upgrade_mysql_dir
|
||||
current_version="$(ynh_app_upstream_version)~ynh$(ynh_app_package_version)"
|
||||
ynh_app_setting_set --app=$app --key=internal_version --value=$current_version
|
||||
fi
|
||||
|
||||
updated_src_version=$(ynh_app_upstream_version)
|
||||
ynh_app_setting_set --app=$app --key=src_version --value=$updated_src_version
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue