1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/spip_ynh.git synced 2024-09-03 20:25:59 +02:00

Nettoyage des coquilles

This commit is contained in:
magikcypress 2017-02-22 00:38:20 +01:00
parent f7482b5400
commit 901a4c59ac
5 changed files with 9 additions and 10 deletions

View file

@ -1,6 +1,5 @@
#--MULTISITE--if (!-e $request_filename) { #--MULTISITE--if (!-e $request_filename) {
#--MULTISITE--rewrite /wp-admin$ $scheme://$host$uri/ permanent; #--MULTISITE--rewrite /ecrire$ $scheme://$host$uri/ permanent;
#--MULTISITE--rewrite ^__PATHTOCHANGE__(/[^/]+)?(/wp-.*) __PATHTOCHANGE__$2 last;
#--MULTISITE--rewrite ^__PATHTOCHANGE__(/[^/]+)?(/.*\.php)$ __PATHTOCHANGE__$2 last; #--MULTISITE--rewrite ^__PATHTOCHANGE__(/[^/]+)?(/.*\.php)$ __PATHTOCHANGE__$2 last;
#--MULTISITE--} #--MULTISITE--}

View file

@ -64,11 +64,11 @@ sudo sed -i "s@__NAMETOCHANGE__@$app@g" /etc/nginx/conf.d/$domain.d/$app.conf
POOL_FPM POOL_FPM
sudo cp ../conf/config.php $final_path/config/config.php sudo cp ../conf/connect.php $final_path/config/connect.php
# Changer les variables du ficher de configuration de SPIP # Changer les variables du ficher de configuration de SPIP
sudo sed -i "s/__DB_USER__/$db_user/g" $final_path/config/config.php sudo sed -i "s/__DB_USER__/$db_user/g" $final_path/config/connect.php
sudo sed -i "s/__DB_PWD__/$db_pwd/g" $final_path/config/config.php sudo sed -i "s/__DB_PWD__/$db_pwd/g" $final_path/config/connect.php
# Donne un accès public pour curl # Donne un accès public pour curl
ynh_app_setting_set $app unprotected_uris "/" ynh_app_setting_set $app unprotected_uris "/"

View file

@ -40,14 +40,14 @@ db_user=$app
ynh_mysql_create_db $db_user $db_user $db_pwd ynh_mysql_create_db $db_user $db_user $db_pwd
sudo su -c "mysql -u $db_user -p$db_pwd $app < ${backup_dir}/db.sql" sudo su -c "mysql -u $db_user -p$db_pwd $app < ${backup_dir}/db.sql"
sudo rm -f "${backup_dir}/db.sql" sudo rm -f "${backup_dir}/db.sql"
sudo sed -i -e "s/'DB_USER', *'[^']*'/'DB_USER', '$app'/g" $final_path/wp-config.php sudo sed -i -e "s/'DB_USER', *'[^']*'/'DB_USER', '$app'/g" $final_path/config/connect.php
sudo sed -i -e "s/'DB_NAME', *'[^']*'/'DB_NAME', '$app'/g" $final_path/wp-config.php sudo sed -i -e "s/'DB_NAME', *'[^']*'/'DB_NAME', '$app'/g" $final_path/config/connect.php
# Set permissions # Set permissions
# Les fichiers appartiennent à www-data, pour permettre les mises à jour. # Les fichiers appartiennent à www-data, pour permettre les mises à jour.
sudo chown -R www-data: $final_path sudo chown -R www-data: $final_path
# Sauf le fichier de config wp-config.php qui appartient à root # Sauf le fichier de config connect.php qui appartient à root
sudo chown root: $final_path/wp-config.php sudo chown root: $final_path/config/connect.php
# Copy dedicated php-fpm process from backup folder to the right location # Copy dedicated php-fpm process from backup folder to the right location
sudo cp -a $backup_dir/conf/php-fpm.conf /etc/php5/fpm/pool.d/$app.conf sudo cp -a $backup_dir/conf/php-fpm.conf /etc/php5/fpm/pool.d/$app.conf

View file

@ -37,7 +37,7 @@ sed -i "s@ALIASTOCHANGE@$final_path/@g" ../conf/nginx.conf*
if [ $is_public = "Yes" ]; if [ $is_public = "Yes" ];
then then
sudo cp ../conf/nginx.conf-public /etc/nginx/conf.d/$domain.d/$app.conf sudo cp ../conf/nginx.conf-public /etc/nginx/conf.d/$domain.d/$app.conf
# grep -q "define('FORCE_SSL_ADMIN', true);" $final_path/wp-config.php # grep -q "define('FORCE_SSL_ADMIN', true);" $final_path/config/connect.php
# if [[ ! $? -eq 0 ]]; # if [[ ! $? -eq 0 ]];
# then # then
# echo "define('FORCE_SSL_ADMIN', true);" | sudo tee -a $final_path/config/connect.php # echo "define('FORCE_SSL_ADMIN', true);" | sudo tee -a $final_path/config/connect.php