diff --git a/scripts/install b/scripts/install index 0e554b5..06b170d 100755 --- a/scripts/install +++ b/scripts/install @@ -176,6 +176,8 @@ ynh_exec_warn_less ynh_install_composer --phpversion="$phpversion" --workdir="$f #================================================= ynh_script_progression --message="Deploying..." +update-alternatives --set php /usr/bin/php$phpversion + pushd "$final_path" ynh_use_nodejs yarn install @@ -197,6 +199,8 @@ pushd "$final_path" php$phpversion artisan config:clear popd +update-alternatives --set php /usr/bin/php${YNH_DEFAULT_PHP_VERSION} + #================================================= # STORE THE CONFIG FILE CHECKSUM #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 8ff79c2..aa5ac43 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -196,6 +196,8 @@ ynh_add_config --template="../conf/.env" --destination="$config" #================================================= ynh_script_progression --message="Deploying..." +update-alternatives --set php /usr/bin/php$phpversion + pushd "$final_path" ynh_use_nodejs yarn install @@ -241,6 +243,8 @@ if ynh_version_gt "2.15.0" "${previous_version}" ; then popd fi +update-alternatives --set php /usr/bin/php${YNH_DEFAULT_PHP_VERSION} + #================================================= # STORE THE CONFIG FILE CHECKSUM #=================================================