From 23211dff3cc38d5646ec2ad06897607b85704ed3 Mon Sep 17 00:00:00 2001 From: nemsia Date: Mon, 10 Apr 2017 23:27:02 +0200 Subject: Set postgre encoding on UTF8 --- scripts/install | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index b5236ec..4541d02 100644 --- a/scripts/install +++ b/scripts/install @@ -66,8 +66,20 @@ sudo apt-get -y install nodejs sudo npm install -g yarn # Create DB without password -sudo systemctl restart postgresql -ynh_psql_create_db_without_password "$app" +# sudo systemctl restart postgresql +# ynh_psql_create_db_without_password "$app" +# Don't work + +# Create user mastodon and set UTF8 encoding by default +sudo su - postgres +psql +CREATE USER mastodon CREATEDB; +update pg_database set datistemplate='false' where datname='template1'; +drop database template1; +create database template1 encoding='UTF8' template template0; +update pg_database set datistemplate='true' where datname='template1'; +\q +exit # Download all Ruby source sudo git clone https://github.com/rbenv/rbenv.git $final_path/.rbenv -- cgit v1.2.3-70-g09d2