1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/lufi_ynh.git synced 2024-09-03 19:36:28 +02:00

fix Error: : must be owner of extension plpgsql

This commit is contained in:
yalh76 2020-06-03 21:07:49 +02:00
parent bbe654850e
commit f33230ddf6
2 changed files with 3 additions and 3 deletions

View file

@ -49,7 +49,7 @@ ynh_remove_systemd_config
ynh_script_progression --message="Removing the PostgreSQL database..."
# Remove a database if it exists, along with the associated user
ynh_psql_remove_db --db_user=$db_user --db_name=$db_name
ynh_psql_remove_db --db_user="$db_user" --db_name="$db_name"
#=================================================
# REMOVE DEPENDENCIES

View file

@ -32,6 +32,7 @@ path_url=$(ynh_app_setting_get --app=$app --key=path)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
db_user=$db_name
db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd)
#=================================================
# CHECK IF THE APP CAN BE RESTORED
@ -94,9 +95,8 @@ echo yes | cpanm Carton
ynh_script_progression --message="Restoring the PostregSQL database..."
ynh_psql_test_if_first_run
db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd)
ynh_psql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd
ynh_psql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
ynh_psql_execute_file_as_root --file="./db.sql" --database="$db_name"
#=================================================
# RESTORE SYSTEMD