aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornemsia <nemsia@nemsia.org>2017-04-10 23:27:02 +0200
committerGitHub <noreply@github.com>2017-04-10 23:27:02 +0200
commit23211dff3cc38d5646ec2ad06897607b85704ed3 (patch)
treeb31bc927487b08ee9c46b3e3abffadbe73e1fd93
parent1c8abcfbef197a27155e9ce6a78eae144d35e061 (diff)
downloadmastodon_ynh-23211dff3cc38d5646ec2ad06897607b85704ed3.tar.gz
mastodon_ynh-23211dff3cc38d5646ec2ad06897607b85704ed3.tar.bz2
mastodon_ynh-23211dff3cc38d5646ec2ad06897607b85704ed3.zip
Set postgre encoding on UTF8
-rw-r--r--scripts/install16
1 files 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