Correct the psql command
[akkoma] / docs / installation / releases_en.md
index 918ae83e1659a2e15ef68cc72dffcfe550a12ee8..10d8879afecafb8fceb6410c8388d4ccd21f6463 100644 (file)
@@ -15,7 +15,7 @@ Paste the following into the shell:
 arch="$(arch)";if [ "$arch" = "x86_64" ];then arch="amd64";elif [ "$arch" = "armv7l" ];then arch="arm";elif [ "$arch" = "aarch64" ];then arch="arm64";else echo "Unsupported arch: $arch">&2;exit 1;fi;if getconf GNU_LIBC_VERSION>/dev/null;then libc_postfix="";elif [ "$(ldd 2>&1|head -c 9)" = "musl libc" ];then libc_postfix="-musl";elif [ "$(find /lib/libc.musl*|wc -l)" ];then libc_postfix="-musl";else echo "Unsupported libc">&2;exit 1;fi;echo "$arch$libc_postfix"
 ```
 
-If your platform is supported the output will contain the flavour string, you will need it later. If not, this just means that we don't build releases for your platform, you can still try the regular install.
+If your platform is supported the output will contain the flavour string, you will need it later. If not, this just means that we don't build releases for your platform, you can still try installing from source.
 
 ### Installing the required packages
 
@@ -24,7 +24,7 @@ Other than things bundled in the OTP release Pleroma depends on:
 * unzip (needed to unpack release builds)
 * ncurses (ERTS won't run without it)
 * PostgreSQL (also utilizes extensions in postgresql-contrib)
-* nginx (could be swapped with another webserver but this guide covers only it)
+* nginx (could be swapped with another reverse proxy but this guide covers only it)
 * certbot (for Let's Encrypt certificates, could be swapped with another ACME client, but this guide covers only it)
 
 Debian/Ubuntu:
@@ -70,7 +70,7 @@ rc-service postgresql restart
 ### Installing Pleroma
 ```sh
 # Create the Pleroma user
-adduser -S -s /bin/false -h /opt/pleroma -H pleroma
+adduser --system --shell  /bin/false --home /opt/pleroma pleroma
 
 # Set the flavour environment variable to the string you got in Detecting flavour section. 
 # For example if the flavour is `arm64-musl` the command will be
@@ -78,7 +78,6 @@ export FLAVOUR="arm64-musl"
 
 # Clone the release build into a temporary directory and unpack it
 su pleroma -s $SHELL -lc "
-echo '$FLAVOUR'
 curl 'https://git.pleroma.social/api/v4/projects/2/jobs/artifacts/master/download?job=$FLAVOUR' -o /tmp/pleroma.zip
 unzip /tmp/pleroma.zip -d /tmp/
 "
@@ -93,22 +92,22 @@ rm /tmp/pleroma.zip
 # Note: It does not have to be `/var/lib/pleroma/uploads`, the config generator will ask about the upload directory later
 
 mkdir -p /var/lib/pleroma/uploads
-chown -R pleroma:pleroma /var/lib/pleroma
+chown -R pleroma /var/lib/pleroma
 
 # Create custom public files directory (custom emojis, frontend bundle overrides, robots.txt, etc.)
 # Note: It does not have to be `/var/lib/pleroma/static`, the config generator will ask about the custom public files directory later
 mkdir -p /var/lib/pleroma/static
-chown -R pleroma:pleroma /var/lib/pleroma
+chown -R pleroma /var/lib/pleroma
 
 # Create a config directory
 mkdir -p /etc/pleroma
-chown -R pleroma:pleroma /etc/pleroma
+chown -R pleroma /etc/pleroma
 
 # Run the config generator
 su pleroma -s $SHELL -lc "./bin/pleroma_ctl instance gen --output /etc/pleroma/config.exs --output-psql /tmp/setup_db.psql"
 
 # Create the postgres database
-psql -U postgres -d postgres -f /tmp/setup_db.psql
+su postgres -s $SHELL -lc "psql -f /tmp/setup_db.psql"
 
 # If you have installed RUM indexes add
 # `config :pleroma, :database, rum_enabled: true`
@@ -119,7 +118,7 @@ psql -U postgres -d postgres -f /tmp/setup_db.psql
 ./bin/pleroma_ctl migrate
 
 # If you have installed RUM indexes also run
-./bin/pleroma_ctl migrate --migrations-path priv/repo/optional_migrations/rum_indexing/
+./bin/pleroma_ctl migrate --migrations-path priv/repo/optional_migrations/rum_indexing/
 
 # Start the instance to verify that everything is working as expected
 ./bin/pleroma daemon