From a839954d94848eafa82d3d7366821e9b2e387c93 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sun, 17 Jan 2021 16:01:46 +0100 Subject: [PATCH] Proper db_name in install --- scripts/install | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index e1d1c5a..f644405 100755 --- a/scripts/install +++ b/scripts/install @@ -93,11 +93,13 @@ ynh_print_ON # Create postgresql database ynh_psql_test_if_first_run +db_name=$app ynh_print_OFF -ynh_psql_create_user $app $db_pwd +ynh_psql_create_user $db_name $db_pwd ynh_print_ON ynh_psql_execute_as_root \ ---sql="CREATE DATABASE $app ENCODING 'UTF8' LC_COLLATE='C' LC_CTYPE='C' template=template0 OWNER $app;" +--sql="CREATE DATABASE $db_name ENCODING 'UTF8' LC_COLLATE='C' LC_CTYPE='C' template=template0 OWNER $app;" +ynh_app_setting_set --app=$app --key=db_name --value=$db_name #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE