diff --git a/conf/config.php b/conf/connect.php similarity index 100% rename from conf/config.php rename to conf/connect.php diff --git a/conf/nginx.conf b/conf/nginx.conf index b1eca41..2ed3b7d 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,6 +1,5 @@ #--MULTISITE--if (!-e $request_filename) { - #--MULTISITE--rewrite /wp-admin$ $scheme://$host$uri/ permanent; - #--MULTISITE--rewrite ^__PATHTOCHANGE__(/[^/]+)?(/wp-.*) __PATHTOCHANGE__$2 last; + #--MULTISITE--rewrite /ecrire$ $scheme://$host$uri/ permanent; #--MULTISITE--rewrite ^__PATHTOCHANGE__(/[^/]+)?(/.*\.php)$ __PATHTOCHANGE__$2 last; #--MULTISITE--} diff --git a/scripts/install b/scripts/install index a9632f2..63fe196 100644 --- a/scripts/install +++ b/scripts/install @@ -64,11 +64,11 @@ sudo sed -i "s@__NAMETOCHANGE__@$app@g" /etc/nginx/conf.d/$domain.d/$app.conf 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 -sudo sed -i "s/__DB_USER__/$db_user/g" $final_path/config/config.php -sudo sed -i "s/__DB_PWD__/$db_pwd/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/connect.php # Donne un accès public pour curl ynh_app_setting_set $app unprotected_uris "/" diff --git a/scripts/restore b/scripts/restore index 972a016..4d225e0 100644 --- a/scripts/restore +++ b/scripts/restore @@ -40,14 +40,14 @@ db_user=$app 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 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_NAME', *'[^']*'/'DB_NAME', '$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/config/connect.php # Set permissions # Les fichiers appartiennent à www-data, pour permettre les mises à jour. sudo chown -R www-data: $final_path -# Sauf le fichier de config wp-config.php qui appartient à root -sudo chown root: $final_path/wp-config.php +# Sauf le fichier de config connect.php qui appartient à root +sudo chown root: $final_path/config/connect.php # 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 diff --git a/scripts/upgrade b/scripts/upgrade index d20113b..55202b9 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -37,7 +37,7 @@ sed -i "s@ALIASTOCHANGE@$final_path/@g" ../conf/nginx.conf* if [ $is_public = "Yes" ]; then 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 ]]; # then # echo "define('FORCE_SSL_ADMIN', true);" | sudo tee -a $final_path/config/connect.php