mirror of
https://github.com/YunoHost-Apps/opensondage_ynh.git
synced 2024-09-03 19:46:28 +02:00
Update upgrade
This commit is contained in:
parent
bf7f8d8437
commit
9c6adec34e
1 changed files with 3 additions and 16 deletions
|
@ -16,12 +16,6 @@ source /usr/share/yunohost/helpers
|
||||||
email=$(ynh_user_get_info --username=$admin --key=mail)
|
email=$(ynh_user_get_info --username=$admin --key=mail)
|
||||||
timezone="$(cat /etc/timezone)"
|
timezone="$(cat /etc/timezone)"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# CHECK VERSION
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
upgrade_type=$(ynh_check_app_version_changed)
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -37,10 +31,8 @@ chown -R $app:www-data "$install_dir"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=3
|
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=3
|
||||||
|
|
||||||
# Create a dedicated PHP-FPM config
|
|
||||||
ynh_add_fpm_config
|
ynh_add_fpm_config
|
||||||
|
|
||||||
# Create a dedicated NGINX config
|
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -70,16 +62,11 @@ touch "$install_dir/admin/stdout.log"
|
||||||
#=================================================
|
#=================================================
|
||||||
# RUN DATABASE UPGRADE
|
# RUN DATABASE UPGRADE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Upgrading database..." --weight=2
|
||||||
|
|
||||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
ynh_install_composer
|
||||||
then
|
|
||||||
ynh_script_progression --message="Upgrading database..." --weight=2
|
|
||||||
|
|
||||||
# Install composer
|
ynh_exec_warn_less php$phpversion "$install_dir/admin/migration.php"
|
||||||
ynh_install_composer
|
|
||||||
|
|
||||||
ynh_exec_warn_less php$phpversion "$install_dir/admin/migration.php"
|
|
||||||
fi
|
|
||||||
|
|
||||||
chown -R $app: "$install_dir/"{tpl_c,admin/stdout.log}
|
chown -R $app: "$install_dir/"{tpl_c,admin/stdout.log}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue