fix incorrect indent of the installation section

License MIT
This commit is contained in:
Loïc Dachary 2021-06-18 15:48:29 +02:00
parent 9d2d1da7c2
commit 3100023469
No known key found for this signature in database
GPG Key ID: 130A0B53C3EEB5FA
1 changed files with 26 additions and 26 deletions

View File

@ -6,38 +6,38 @@ Installation
1. Setup the repository::
$ wget -O - https://deb.entrouvert.org/entrouvert.gpg | apt-key add -
$ echo deb http://deb.entrouvert.org/ buster main >> /etc/apt/sources.list
$ apt update
$ wget -O - https://deb.entrouvert.org/entrouvert.gpg | apt-key add -
$ echo deb http://deb.entrouvert.org/ buster main >> /etc/apt/sources.list
$ apt update
2. Create the database::
$ apt install apg
$ PASSWORD=$(apg -n 1 -M NCL -m 20)
$ apt install postgresql
$ su - postgres -c psql <<EOF
CREATE ROLE authentic2 WITH LOGIN SUPERUSER PASSWORD '$PASSWORD';
ALTER ROLE authentic2 SET client_encoding TO 'utf8';
CREATE DATABASE authentic2;
GRANT ALL PRIVILEGES ON DATABASE authentic2 TO authentic2;
EOF
$ mkdir -p /etc/authentic2/settings.d
$ cat > /etc/authentic2/settings.d/database.py <<EOF
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql",
"NAME": "authentic2",
"USER": "authentic2",
"PASSWORD": "$PASSWORD",
"HOST": "127.0.0.1",
"PORT": "5432",
}
}
EOF
$ apt install apg
$ PASSWORD=$(apg -n 1 -M NCL -m 20)
$ apt install postgresql
$ su - postgres -c psql
CREATE ROLE authentic2 WITH LOGIN SUPERUSER PASSWORD '$PASSWORD';
ALTER ROLE authentic2 SET client_encoding TO 'utf8';
CREATE DATABASE authentic2;
GRANT ALL PRIVILEGES ON DATABASE authentic2 TO authentic2;
EOF
$ mkdir -p /etc/authentic2/settings.d
$ cat > /etc/authentic2/settings.d/database.py <<EOF
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql",
"NAME": "authentic2",
"USER": "authentic2",
"PASSWORD": "$PASSWORD",
"HOST": "127.0.0.1",
"PORT": "5432",
}
}
EOF
3. Install::
$ apt install authentic2
$ apt install authentic2
.. note::