mirror of
https://github.com/YunoHost-Apps/my_webapp_ynh.git
synced 2024-09-03 19:46:26 +02:00
Reinstall all the dependencies when changing php version² (remove php-fpm deps if phpversion is none)
This commit is contained in:
parent
f7e3c828ec
commit
72ae3827de
1 changed files with 5 additions and 4 deletions
|
@ -119,6 +119,11 @@ ynh_app_config_apply() {
|
|||
# ^ ynh_add_config replaces __PHPVERSION__ by __PHP_YNH_VERSION__...
|
||||
ynh_app_setting_set --app=$app --key=phpversion --value="$phpversion"
|
||||
|
||||
database=$(ynh_app_setting_get --app=$app --key=database)
|
||||
dependencies="$(ynh_read_manifest -k "resources.apt.packages")"
|
||||
dependencies_from_raw_bash=$(eval "$(ynh_read_manifest -k "resources.apt.packages_from_raw_bash")" | tr "\n" " ")
|
||||
ynh_install_app_dependencies "$dependencies $dependencies_from_raw_bash"
|
||||
|
||||
nginx_extra_conf_dir="/etc/nginx/conf.d/$domain.d/$app.d"
|
||||
mkdir -p "$nginx_extra_conf_dir"
|
||||
if [ "$phpversion" == "none" ]
|
||||
|
@ -127,10 +132,6 @@ ynh_app_config_apply() {
|
|||
ynh_secure_remove --file="$nginx_extra_conf_dir/php.conf"
|
||||
else
|
||||
ynh_add_config --template="nginx-php.conf" --destination="$nginx_extra_conf_dir/php.conf"
|
||||
database=$(ynh_app_setting_get --app=$app --key=database)
|
||||
dependencies="$(ynh_read_manifest -k "resources.apt.packages")"
|
||||
dependencies_from_raw_bash=$(eval "$(ynh_read_manifest -k "resources.apt.packages_from_raw_bash")" | tr "\n" " ")
|
||||
ynh_install_app_dependencies "$dependencies $dependencies_from_raw_bash"
|
||||
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$phpversion
|
||||
# ^ the helper takes care of ynh_app_setting_set the phpversion
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue