diff --git a/scripts/install b/scripts/install index 4e17ed9..e28333d 100644 --- a/scripts/install +++ b/scripts/install @@ -122,11 +122,10 @@ ynh_script_progression --message="Configuring php-fpm..." --time --weight=1 # Create a dedicated php-fpm config #ynh_replace_string --match_string="YHTZ" --replace_string="$timezone" --target_file=../conf/php-fpm.conf +phpversion=$(ynh_app_setting_get --app="$app" --key=phpversion) ynh_add_fpm_config --package="$extra_php_dependencies" -phpversion=$(ynh_app_setting_get --app="$app" --key=phpversion) - #================================================= # SET CONFIGURATION FILE #================================================= @@ -144,14 +143,22 @@ ynh_store_file_checksum --file="$final_path/config/db.inc.php" # Install PHP dependencies using composer #================================================= -pushd "$final_path" || ynh_die -export COMPOSER_HOME=$final_path +# pushd "$final_path" || ynh_die +# export COMPOSER_HOME=$final_path +# curl -sS https://getcomposer.org/installer | php -- --install-dir="$final_path" \ +# && php composer.phar config --global discard-changes true --quiet \ +# && php composer.phar install --no-interaction --quiet +# #sudo -u www-data php composer.phar install +# #sudo -u www-data php composer.phar $app:migrate +# popd || ynh_die + +( + cd "$final_path" + export COMPOSER_HOME=$final_path curl -sS https://getcomposer.org/installer | php -- --install-dir="$final_path" \ - && php composer.phar config --global discard-changes true --quiet \ - && php composer.phar install --no-interaction --quiet - #sudo -u www-data php composer.phar install - #sudo -u www-data php composer.phar $app:migrate -popd || ynh_die + && php composer.phar config --global discard-changes true --quiet \ + && php composer.phar install --no-interaction --quiet +) #================================================= # SETUP SYSTEMD