1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/galette_ynh.git synced 2024-09-03 18:36:28 +02:00
This commit is contained in:
Éric Gaspar 2023-11-11 14:35:58 +01:00
parent 3c85fbd348
commit 6bc5241434
2 changed files with 10 additions and 1 deletions

View file

@ -25,6 +25,14 @@ ynh_remove_nginx_config
# Remove the dedicated PHP-FPM config
ynh_remove_fpm_config
if [ $database == "postgresql" ]
then
ynh_script_progression --message="Removing PostgreSQL database..." --weight=2
ynh_psql_remove_db --db_user=$db_user --db_name=$db_name
else
ynh_script_progression --message="Removing MySQL database..." --weight=2
ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name
fi
#=================================================
# END OF SCRIPT
#=================================================

View file

@ -32,7 +32,8 @@ chown -R $app:www-data "$install_dir"
if [ $database == "postgresql" ]
then
ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name
#ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name
ynh_psql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
else
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
fi