fix postgresql user role creation

This commit is contained in:
yalh76 2019-03-31 19:27:20 +02:00
parent 28d207a109
commit c1608aac61
4 changed files with 6 additions and 3 deletions

View File

@ -6,7 +6,7 @@
"en": "An open source, modern and powerful wiki app built on Node.js, Git and Markdown.",
"fr": "Un wiki moderne et open source propulsé Node.js, Git et Markdown."
},
"version": "2.0.0-beta.68~ynh1",
"version": "2.0.0-beta.68~ynh2",
"url": "https://wiki.js.org/",
"license": "AGPL-3.0-or-later",
"maintainer": {

View File

@ -79,7 +79,7 @@ db_pwd=$(ynh_string_random 30)
ynh_app_setting_set "$app" db_name "$db_name"
ynh_app_setting_set "$app" db_pwd "$db_pwd"
ynh_psql_test_if_first_run
ynh_psql_create_db "$db_name" "$db_name" "$db_pwd"
ynh_psql_setup_db "$db_name" "$db_name" "$db_pwd"
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE

View File

@ -92,7 +92,7 @@ ynh_install_app_dependencies $pkg_dependencies
ynh_print_info "Restoring the PostgreSQL database..."
ynh_psql_test_if_first_run
ynh_psql_create_db "$db_name" "$db_name" "$db_pwd"
ynh_psql_setup_db "$db_name" "$db_name" "$db_pwd"
ynh_psql_execute_file_as_root ./db.sql "$db_name"
#=================================================

View File

@ -59,6 +59,9 @@ ynh_secure_remove "/etc/apt/sources.list.d/yarn.list"
# Remove old log file
ynh_secure_remove "/var/log/$app/"
# Create PostgreSQL User
ynh_psql_create_user $db_name $db_pwd
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================