From 265055be172d6f71e086908fc1123b62840db0f2 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Thu, 10 Jun 2021 10:59:54 +0200 Subject: Reworked article --- content/docs/freebsd/postgresql.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'content/docs/freebsd') diff --git a/content/docs/freebsd/postgresql.md b/content/docs/freebsd/postgresql.md index 9fac8c7..c2797c2 100644 --- a/content/docs/freebsd/postgresql.md +++ b/content/docs/freebsd/postgresql.md @@ -56,9 +56,8 @@ bastille service postgresql postgresql start Let's say we want to allow a gitea jail running from 10.0.0.4 to a gitea database using a gitea user : ``` -echo "CREATE ROLE gitea WITH LOGIN PASSWORD 'secret';" \ - | bastille cmd postgresql su - postgres -c psql -echo "CREATE DATABASE gitea WITH OWNER gitea TEMPLATE template0 ENCODING UTF8 LC_COLLATE 'en_US.UTF-8' LC_CTYPE 'en_US.UTF-8';" \ +echo "CREATE ROLE gitea WITH LOGIN PASSWORD 'secret'; + CREATE DATABASE gitea WITH OWNER gitea TEMPLATE template0 ENCODING UTF8 LC_COLLATE 'en_US.UTF-8' LC_CTYPE 'en_US.UTF-8';" \ | bastille cmd postgresql su - postgres -c psql echo "host gitea gitea 10.0.0.4/32 scram-sha-256" | bastille cmd postgresql tee -a /var/db/postgres/data13/pg_hba.conf -- cgit v1.2.3