mirror of
https://github.com/YunoHost-Apps/spip_ynh.git
synced 2024-09-03 20:25:59 +02:00
Correction sur le connect.php pour remplacer les bons paramètres de connexion
This commit is contained in:
parent
4d924b6e3f
commit
c8ef25de20
1 changed files with 3 additions and 1 deletions
|
@ -45,8 +45,10 @@ if [[ $with_mysql -eq 1 ]]; then
|
||||||
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 < ./db.sql"
|
sudo su -c "mysql -u $db_user -p$db_pwd $app < ./db.sql"
|
||||||
sudo rm -f "./db.sql"
|
sudo rm -f "./db.sql"
|
||||||
sudo sed -i -e "s/'__DB_USER__', *'[^']*'/'__DB_USER__', '$app'/g" $final_path/config/connect.php
|
# sudo sed -i -e "s/'__DB_USER__', *'[^']*'/'__DB_USER__', '$app'/g" $final_path/config/connect.php
|
||||||
# sudo sed -i -e "s/'__DB_PWD__', *'[^']*'/'__DB_PWD__', '$app'/g" $final_path/config/connect.php
|
# sudo sed -i -e "s/'__DB_PWD__', *'[^']*'/'__DB_PWD__', '$app'/g" $final_path/config/connect.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
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set permissions
|
# Set permissions
|
||||||
|
|
Loading…
Reference in a new issue