From f01f941513c363b63f9b5d4ffde79de05509de8d Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 3 Oct 2021 12:27:47 +0200 Subject: [PATCH] Update install --- scripts/install | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/scripts/install b/scripts/install index f03e6f1..182f4c2 100644 --- a/scripts/install +++ b/scripts/install @@ -84,7 +84,7 @@ ynh_system_user_create --username=$app --home_dir="$final_path" ynh_script_progression --message="Creating a PostgreSQL database..." --weight=2 db_name=$(ynh_sanitize_dbid --db_name=$app) -db_user=$db_name +db_user="kemal" ynh_app_setting_set --app=$app --key=db_name --value=$db_name ynh_psql_test_if_first_run ynh_psql_setup_db --db_user=$db_name --db_name=$db_name @@ -103,10 +103,7 @@ pushd "$final_path" git reset --hard --quiet $version_commit popd -for i in $final_path/config/sql/*.sql ; do - ynh_replace_string --match_string="kemal" --replace_string=$db_user --target_file="$i" ; - ynh_psql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < "$i" ; -done +ynh_psql_connect_as --user=$db_user --password=$db_pwd --database=$db_name chmod 750 "$final_path" chmod -R o-rwx "$final_path"