mirror of
https://github.com/YunoHost-Apps/dokuwiki_ynh.git
synced 2024-09-03 18:26:20 +02:00
Fix "php conf location" breaking backup script
See https://github.com/YunoHost-Apps/dokuwiki_ynh/issues/96 the bug: > php file is still in folder: '/etc/php/7.4/fpm/pool.d/' after upgrade > instead of '8.1' folder. Changing the "ynh_add_fpm_config" for the fix. The helper should do the "php version handling" instead of the package itself Example taken on the package: https://github.com/YunoHost-Apps/wordpress_ynh/blob/testing/scripts/upgrade
This commit is contained in:
parent
7c2d6a938a
commit
90345a544e
1 changed files with 8 additions and 2 deletions
|
@ -76,6 +76,12 @@ if [ -z "$fpm_usage" ]; then
|
|||
ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage
|
||||
fi
|
||||
|
||||
# If phpversion doesn't exist, create it
|
||||
if [ -z "$phpversion" ]; then
|
||||
phpversion=$YNH_PHP_VERSION
|
||||
ynh_app_setting_set --app=$app --key=phpversion --value=$phpversion
|
||||
fi
|
||||
|
||||
# Cleaning legacy permissions
|
||||
admin_user=$(ynh_app_setting_get --app=$app --key=admin)
|
||||
|
||||
|
@ -217,7 +223,7 @@ ynh_install_app_dependencies $pkg_dependencies
|
|||
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1
|
||||
|
||||
# Create a dedicated PHP-FPM config
|
||||
ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint
|
||||
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
|
@ -299,7 +305,7 @@ fi
|
|||
# Stolen from https://github.com/YunoHost-Apps/grav_ynh/blob/testing/scripts/upgrade#L189
|
||||
if [ -x "$final_path/bin/plugin.php" ]; then
|
||||
pushd "$final_path"
|
||||
ynh_exec_warn_less ynh_exec_as $app php${YNH_PHP_VERSION} bin/plugin.php --no-colors extension upgrade || ynh_print_warn --message="Automatic plugin upgrade has failed, you can upgrade them from your DokuWiki admin panel."
|
||||
ynh_exec_warn_less ynh_exec_as $app php$phpversion bin/plugin.php --no-colors extension upgrade || ynh_print_warn --message="Automatic plugin upgrade has failed, you can upgrade them from your DokuWiki admin panel."
|
||||
popd
|
||||
else
|
||||
ynh_print_warn --message="Automatic plugin cannot be done, you have to upgrade them from your DokuWiki admin panel."
|
||||
|
|
Loading…
Add table
Reference in a new issue