1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/drupal_ynh.git synced 2024-09-03 18:35:53 +02:00
This commit is contained in:
yalh76 2020-03-28 21:04:33 +01:00
parent 97a1615471
commit 33a1198801
4 changed files with 25 additions and 14 deletions

View file

@ -110,8 +110,8 @@ cp -f "../conf/example.site.yml" "$final_path/drush/sites/$app.site.yml"
ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file="$final_path/drush/sites/$app.site.yml"
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$final_path/drush/sites/$app.site.yml"
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$final_path/drush/sites/$app.site.yml"
ynh_replace_string --match_string="__PATH_URL__" --replace_string="$path_url" --target_file="$final_path/drush/sites/$app.site.yml"
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$new_domain" --target_file="$final_path/drush/sites/$app.site.yml"
ynh_replace_string --match_string="__PATH_URL__" --replace_string="$new_path" --target_file="$final_path/drush/sites/$app.site.yml"
#=================================================
# GENERIC FINALISATION

View file

@ -162,16 +162,18 @@ ynh_print_info --message="Installing Drupal..."
chown -R $app: $final_path
pushd "$final_path"
update-alternatives --set php /usr/bin/php7.3
update-alternatives --set php /usr/bin/php7.3
pushd "$final_path"
sudo -u $app env PATH=$PATH drush site:install $install_profil --account-name=$admin --account-pass=$password --account-mail=$admin_mail --db-url=mysql://$db_user:$db_pwd@localhost/$db_name --site-name="$app" --locale=$language --yes
update-alternatives --set php /usr/bin/php7.0
popd
update-alternatives --set php /usr/bin/php7.0
#=================================================
# SET THE CRON FILE
# SETUP THE CRON FILE
#=================================================
ynh_print_info --message="Setting the cron file..."
ynh_print_info --message="Setuping the cron file..."
cp ../conf/cron /etc/cron.d/$app

View file

@ -43,6 +43,14 @@ ynh_print_info --message="Removing php-fpm configuration..."
# Remove the dedicated php-fpm config
ynh_remove_fpm_config
#=================================================
# REMOVE PHP
#=================================================
if [ "$(lsb_release --codename --short)" != "buster" ]; then
ynh_print_info --message="Removing php..."
ynh_remove_php
fi
#=================================================
# REMOVE DEPENDENCIES
#=================================================
@ -50,9 +58,6 @@ ynh_print_info --message="Removing dependencies..."
# Remove metapackage and its dependencies
ynh_remove_app_dependencies
if [ "$(lsb_release --codename --short)" != "buster" ]; then
ynh_remove_php
fi
#=================================================
# REMOVE APP MAIN DIR

View file

@ -98,6 +98,8 @@ else
ynh_remove_app_dependencies
ynh_remove_php
ynh_install_php --phpversion="7.3" --package="$extra_pkg_dependencies"
else
ynh_install_php --phpversion="7.3" --package="$extra_pkg_dependencies"
fi
fi
@ -156,17 +158,19 @@ export PATH="$final_path/vendor/bin:$PATH"
#sudo -u $app env PATH=$PATH drush @$app.prod l10n-update-refresh
#sudo -u $app env PATH=$PATH drush @$app.prod l10n-update
update-alternatives --set php /usr/bin/php7.3
pushd "$final_path"
update-alternatives --set php /usr/bin/php7.3
sudo -u $app env PATH=$PATH drush @$app.prod state:set system.maintenance_mode 1 --input-format=integer
sudo -u $app env PATH=$PATH php7.3 composer.phar update drupal/core webflo/drupal-core-require-dev --with-dependencies
sudo -u $app env PATH=$PATH php7.3 composer.phar update --with-dependencies
sudo -u $app env PATH=$PATH drush @$app.prod -y updatedb
sudo -u $app env PATH=$PATH drush @$app.prod cache:rebuild
sudo -u $app env PATH=$PATH drush @$app.prod state:set system.maintenance_mode 0 --input-format=integer
update-alternatives --set php /usr/bin/php7.0
popd
update-alternatives --set php /usr/bin/php7.0
#=================================================
# STORE THE CONFIG FILE CHECKSUM
#=================================================
@ -176,9 +180,9 @@ ynh_print_info --message="Storing the config file checksum..."
ynh_store_file_checksum --file="$final_path/$app/sites/default/settings.php"
#=================================================
# SET THE CRON FILE
# SETUP THE CRON FILE
#=================================================
ynh_print_info --message="Setting the cron file"
ynh_print_info --message="Setuping the cron file"
cp -f ../conf/cron /etc/cron.d/$app