diff --git a/scripts/install b/scripts/install index 5f1f6b6..347c210 100644 --- a/scripts/install +++ b/scripts/install @@ -144,6 +144,8 @@ ynh_print_info --message="Installing Drupal and CiviCRM..." chown -R $app: $final_path +update-alternatives --set php /usr/bin/php7.2 + pushd "$final_path" sudo -u $app env PATH=$PATH drush pm-download -y drupal-7 --drupal-project-rename=$app popd @@ -170,6 +172,8 @@ chmod 755 $final_path/$app/sites/default/ sudo -u $app env PATH=$PATH drush --include="$final_path/$app/sites/all/modules/civicrm/drupal/drush" @$app civicrm-install --dbhost="localhost" --dbname="$db_name" --dbpass="$db_pwd" --dbuser="$db_user" --destination="sites/all/modules" --site_url="$domain$path_url" --ssl=on +update-alternatives --set php /usr/bin/php7.0 + #================================================= # SETUP THE CRON FILE #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 1117929..fa1d19c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -133,6 +133,8 @@ ynh_print_info --message="Upgrading Drupal..." ynh_backup_if_checksum_is_different --file="$final_path/$app/sites/default/settings.php" export PATH="$final_path/.composer/vendor/bin:$PATH" +update-alternatives --set php /usr/bin/php7.2 + sudo -u $app env PATH=$PATH drush @$app variable-set --exact maintenance_mode 1 sudo -u $app env PATH=$PATH drush @$app cache-clear all sudo -u $app env PATH=$PATH drush @$app pm-update -y drupal @@ -147,6 +149,8 @@ sudo -u $app env PATH=$PATH drush --include="$final_path/$app/sites/all/modules/ sudo -u $app env PATH=$PATH drush @$app vset --exact maintenance_mode 0 +update-alternatives --set php /usr/bin/php7.0 + #================================================= # STORE THE CONFIG FILE CHECKSUM #=================================================