diff --git a/scripts/_common.sh b/scripts/_common.sh index b118cc0..3db6f6b 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -7,7 +7,9 @@ YNH_PHP_VERSION="7.3" # dependencies used by the app -pkg_dependencies="php{YNH_PHP_VERSION}-cli php{YNH_PHP_VERSION}-common php{YNH_PHP_VERSION}-intl php{YNH_PHP_VERSION}-json git" +extra_php_dependencies="php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-common php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-json" + +pkg_dependencies="git" #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index 0e41bd2..941caec 100755 --- a/scripts/install +++ b/scripts/install @@ -91,10 +91,11 @@ ynh_system_user_create --username=$app #================================================= # PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Configuring PHP-FPM." --weight=1 +ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 -# Create a dedicated php-fpm config -ynh_add_fpm_config +# Create a dedicated PHP-FPM config +ynh_add_fpm_config --package="$extra_php_dependencies" +phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # SPECIFIC SETUP diff --git a/scripts/restore b/scripts/restore index 3b05602..b238d5e 100755 --- a/scripts/restore +++ b/scripts/restore @@ -75,9 +75,12 @@ chown -R $app: $final_path #================================================= # RESTORE THE PHP-FPM CONFIGURATION #================================================= +ynh_script_progression --message="Reconfiguring PHP-FPM..." --weight=2 ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" +ynh_add_fpm_config --package="$extra_php_dependencies" + #================================================= # SPECIFIC RESTORATION #=================================================