mirror of
https://github.com/YunoHost-Apps/drupal7_ynh.git
synced 2024-09-03 18:26:19 +02:00
ynh_add_config
This commit is contained in:
parent
f0b4d34314
commit
9f9564ef41
3 changed files with 6 additions and 26 deletions
|
@ -96,6 +96,7 @@ then
|
|||
mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf
|
||||
# Store file checksum for the new config file location
|
||||
ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf"
|
||||
domain="$new_domain"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
@ -105,13 +106,7 @@ fi
|
|||
#=================================================
|
||||
ynh_script_progression --message="Updating Drush alias..."
|
||||
|
||||
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="$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"
|
||||
ynh_add_config --template="../conf/yoursite.aliases.drushrc.php" --destination="$final_path/.drush/$app.aliases.drushrc.php"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALISATION
|
||||
|
|
|
@ -118,13 +118,8 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
|||
ynh_script_progression --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"
|
||||
|
||||
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"
|
||||
ynh_add_config --template="../conf/yoursite.aliases.drushrc.php" --destination="$final_path/.drush/$app.aliases.drushrc.php"
|
||||
|
||||
#=================================================
|
||||
# INSTALL COMPOSER
|
||||
|
@ -133,9 +128,7 @@ ynh_script_progression --message="Installing Composer..."
|
|||
|
||||
mkdir -p "$final_path/.composer"
|
||||
|
||||
cp -f "../conf/composer.json" "$final_path/.composer/composer.json"
|
||||
|
||||
ynh_install_composer --phpversion="$phpversion" --workdir="$final_path/.composer"
|
||||
ynh_add_config --template="../conf/composer.json" --destination="$final_path/.composer/composer.json"
|
||||
|
||||
export PATH="$final_path/.composer/vendor/bin:$PATH"
|
||||
|
||||
|
@ -173,10 +166,7 @@ update-alternatives --set php /usr/bin/php${YNH_DEFAULT_PHP_VERSION}
|
|||
#=================================================
|
||||
ynh_script_progression --message="Setuping the cron file..."
|
||||
|
||||
cp ../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_add_config --template="../conf/cron" --destination="/etc/cron.d/$app"
|
||||
|
||||
#=================================================
|
||||
# STORE THE CONFIG FILE CHECKSUM
|
||||
|
|
|
@ -134,12 +134,7 @@ ynh_store_file_checksum --file="$final_path/$app/sites/default/settings.php"
|
|||
#=================================================
|
||||
ynh_script_progression --message="Setuping the cron file"
|
||||
|
||||
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=reload
|
||||
ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
|
|
Loading…
Add table
Reference in a new issue