From c833bf151e1c078f28a3f5485da0c26eee09ac3d Mon Sep 17 00:00:00 2001 From: anmol26s Date: Fri, 3 Aug 2018 06:33:01 +0530 Subject: [PATCH] Tweaked psql command in upgrade --- scripts/upgrade | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 1867942..b4eb1a4 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -58,10 +58,8 @@ systemctl stop "$app" # Add PostgreSQL extension for v1.0.0-beta.10.pre.1 #=================================================== -ynh_psql_execute_as_root \ -"CREATE EXTENSION IF NOT EXISTS unaccent;" "$db_name" -ynh_psql_execute_as_root \ -"CREATE EXTENSION IF NOT EXISTS pg_trgm;" "$db_name" +sudo --login --user=postgres psql "$db_name" "CREATE EXTENSION IF NOT EXISTS unaccent;" +sudo --login --user=postgres psql "$db_name" "CREATE EXTENSION IF NOT EXISTS pg_trgm;" #================================================= # REMOVE APP MAIN DIR