|
|
@ -139,8 +139,7 @@ ynh_script_progression --message="Upgrading dependencies..." --weight=7 |
|
|
|
|
|
|
|
|
ynh_install_app_dependencies $pkg_dependencies |
|
|
ynh_install_app_dependencies $pkg_dependencies |
|
|
|
|
|
|
|
|
ynh_remove_php |
|
|
|
|
|
ynh_install_php --phpversion="$php_version" --package="$extra_pkg_dependencies" |
|
|
|
|
|
|
|
|
ynh_install_php --phpversion="$YNH_PHP_VERSION" --package="$extra_pkg_dependencies" |
|
|
|
|
|
|
|
|
#================================================= |
|
|
#================================================= |
|
|
# STANDARD UPGRADE STEPS |
|
|
# STANDARD UPGRADE STEPS |
|
|
@ -152,7 +151,7 @@ ynh_script_progression --message="Upgrading nginx web server configuration..." - |
|
|
ynh_backup_if_checksum_is_different --file="/etc/nginx/conf.d/$domain.d/$app.conf" |
|
|
ynh_backup_if_checksum_is_different --file="/etc/nginx/conf.d/$domain.d/$app.conf" |
|
|
|
|
|
|
|
|
# Delete current nginx configuration to be able to check if .well-known is already served. |
|
|
# Delete current nginx configuration to be able to check if .well-known is already served. |
|
|
ynh_remove_nginx_config |
|
|
|
|
|
|
|
|
ynh_remove_nginx_config $YNH_PHP_VERSION |
|
|
ynh_app_setting_delete --app=$app --key="checksum__etc_nginx_conf.d_$domain.d_$app.conf" |
|
|
ynh_app_setting_delete --app=$app --key="checksum__etc_nginx_conf.d_$domain.d_$app.conf" |
|
|
|
|
|
|
|
|
# Check if .well-known is available for this domain |
|
|
# Check if .well-known is available for this domain |
|
|
@ -165,7 +164,7 @@ then |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
# Create a dedicated nginx config |
|
|
# Create a dedicated nginx config |
|
|
ynh_add_nginx_config php_version |
|
|
|
|
|
|
|
|
ynh_add_nginx_config YNH_PHP_VERSION |
|
|
|
|
|
|
|
|
#================================================= |
|
|
#================================================= |
|
|
# CREATE DEDICATED USER |
|
|
# CREATE DEDICATED USER |
|
|
@ -181,11 +180,11 @@ ynh_system_user_create --username=$app |
|
|
ynh_script_progression --message="Upgrading php-fpm configuration..." --weight=2 |
|
|
ynh_script_progression --message="Upgrading php-fpm configuration..." --weight=2 |
|
|
|
|
|
|
|
|
# Create a dedicated php-fpm config |
|
|
# Create a dedicated php-fpm config |
|
|
ynh_add_fpm_config --phpversion="$php_version" |
|
|
|
|
|
|
|
|
ynh_add_fpm_config --phpversion="$YNH_PHP_VERSION" --usage=medium --footprint=high |
|
|
|
|
|
|
|
|
# Delete existing ini configuration file (backward compatibility) |
|
|
# Delete existing ini configuration file (backward compatibility) |
|
|
if [ -f /etc/php/$php_version/fpm/conf.d/20-$app.ini ]; then |
|
|
|
|
|
ynh_secure_remove --file=/etc/php/$php_version/fpm/conf.d/20-$app.ini |
|
|
|
|
|
|
|
|
if [ -f /etc/php/$YNH_PHP_VERSION/fpm/conf.d/20-$app.ini ]; then |
|
|
|
|
|
ynh_secure_remove --file=/etc/php/$YNH_PHP_VERSION/fpm/conf.d/20-$app.ini |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
#================================================= |
|
|
#================================================= |
|
|
@ -198,7 +197,7 @@ fi |
|
|
# Define a function to execute commands with `occ` |
|
|
# Define a function to execute commands with `occ` |
|
|
exec_occ() { |
|
|
exec_occ() { |
|
|
(cd "$final_path" && exec_as "$app" \ |
|
|
(cd "$final_path" && exec_as "$app" \ |
|
|
php$php_version occ --no-interaction --no-ansi "$@") |
|
|
|
|
|
|
|
|
php$YNH_PHP_VERSION occ --no-interaction --no-ansi "$@") |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
# Define a function to add an external storage |
|
|
# Define a function to add an external storage |
|
|
|