mirror of
https://github.com/YunoHost-Apps/drupal7_ynh.git
synced 2024-09-03 18:26:19 +02:00
several adjustements
This commit is contained in:
parent
dae447b7ac
commit
ac9259dfed
3 changed files with 16 additions and 17 deletions
|
@ -106,12 +106,13 @@ fi
|
|||
#=================================================
|
||||
ynh_print_info --message="Updating Drush alias..."
|
||||
|
||||
cp -f "../conf/yoursite.aliases.drushrc.php" "$final_path/.drush/$app.aliases.drushrc.php"
|
||||
drush_aliasconfig="$final_path/.drush/$app.aliases.drushrc.php"
|
||||
cp -f "../conf/yoursite.aliases.drushrc.php" "$drush_aliasconfig"
|
||||
|
||||
ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file="$final_path/.drush/$app.aliases.drushrc.php"
|
||||
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$final_path/.drush/$app.aliases.drushrc.php"
|
||||
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$new_domain" --target_file="$final_path/.drush/$app.aliases.drushrc.php"
|
||||
ynh_replace_string --match_string="__PATH_URL__" --replace_string="$new_path" --target_file="$final_path/.drush/$app.aliases.drushrc.php"
|
||||
ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file="$drush_aliasconfig"
|
||||
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$drush_aliasconfig"
|
||||
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$new_domain" --target_file="$drush_aliasconfig"
|
||||
ynh_replace_string --match_string="__PATH_URL__" --replace_string="$new_path" --target_file="$drush_aliasconfig"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALISATION
|
||||
|
|
|
@ -35,7 +35,7 @@ is_public=$YNH_APP_ARG_IS_PUBLIC
|
|||
language=$YNH_APP_ARG_LANGUAGE
|
||||
password=$YNH_APP_ARG_PASSWORD
|
||||
install_profil=$YNH_APP_ARG_INSTALL_PROFIL
|
||||
admin_mail=$(ynh_user_get_info --username=$admin --key="mail")
|
||||
admin_mail=$(ynh_user_get_info --username=$admin --key=mail)
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
|
@ -124,13 +124,13 @@ mkdir -p "$final_path"
|
|||
ynh_print_info --message="Creating Drush alias..."
|
||||
|
||||
mkdir -p "$final_path/.drush"
|
||||
drush_aliasconfig="$final_path/.drush/$app.aliases.drushrc.php"
|
||||
cp -f "../conf/yoursite.aliases.drushrc.php" "$drush_aliasconfig"
|
||||
|
||||
cp -f "../conf/yoursite.aliases.drushrc.php" "$final_path/.drush/$app.aliases.drushrc.php"
|
||||
|
||||
ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file="$final_path/.drush/$app.aliases.drushrc.php"
|
||||
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$final_path/.drush/$app.aliases.drushrc.php"
|
||||
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$final_path/.drush/$app.aliases.drushrc.php"
|
||||
ynh_replace_string --match_string="__PATH_URL__" --replace_string="$path_url" --target_file="$final_path/.drush/$app.aliases.drushrc.php"
|
||||
ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file="$drush_aliasconfig"
|
||||
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$drush_aliasconfig"
|
||||
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$drush_aliasconfig"
|
||||
ynh_replace_string --match_string="__PATH_URL__" --replace_string="$path_url" --target_file="$drush_aliasconfig"
|
||||
|
||||
#=================================================
|
||||
# INSTALL COMPOSER
|
||||
|
@ -155,7 +155,7 @@ chown -R $app: $final_path
|
|||
update-alternatives --set php /usr/bin/php7.3
|
||||
|
||||
pushd "$final_path"
|
||||
sudo -u $app env PATH=$PATH drush pm-download drupal-7 --drupal-project-rename=$app
|
||||
sudo -u $app env PATH=$PATH drush pm-download -y drupal-7 --drupal-project-rename=$app
|
||||
popd
|
||||
|
||||
sudo -u $app env PATH=$PATH drush @$app 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
|
||||
|
|
|
@ -143,15 +143,13 @@ ynh_backup_if_checksum_is_different --file="$final_path/$app/sites/default/setti
|
|||
export PATH="$final_path/.composer/vendor/bin:$PATH"
|
||||
|
||||
update-alternatives --set php /usr/bin/php7.3
|
||||
|
||||
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
|
||||
sudo -u $app env PATH=$PATH drush @$app vset --exact maintenance_mode 0
|
||||
sudo -u $app env PATH=$PATH drush @$app cache-clear all
|
||||
sudo -u $app env PATH=$PATH drush @$app l10n-update-refresh
|
||||
sudo -u $app env PATH=$PATH drush @$app l10n-update
|
||||
|
||||
sudo -u $app env PATH=$PATH drush @$app variable-set --exact maintenance_mode 0
|
||||
update-alternatives --set php /usr/bin/php7.0
|
||||
|
||||
#=================================================
|
||||
|
@ -172,7 +170,7 @@ cp -f ../conf/cron /etc/cron.d/$app
|
|||
ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file="/etc/cron.d/$app"
|
||||
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="/etc/cron.d/$app"
|
||||
|
||||
ynh_systemd_action --service_name=cron --action=restart
|
||||
ynh_systemd_action --service_name=cron --action=reload
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
|
|
Loading…
Add table
Reference in a new issue