From a4d1b72dec17fc735a0265b92f4b465bd7af27e2 Mon Sep 17 00:00:00 2001 From: Gitouche <26656-gitouche@users.noreply.framagit.org> Date: Sat, 12 Feb 2022 19:09:02 +0100 Subject: [PATCH] Matrix : cleanup --- podman-matrix/10_install.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/podman-matrix/10_install.sh b/podman-matrix/10_install.sh index 9f194a4..cd48cbc 100755 --- a/podman-matrix/10_install.sh +++ b/podman-matrix/10_install.sh @@ -20,22 +20,22 @@ if ! podman volume exists ${dbvolume} ; then exit 1 fi -podman pod create --publish ${listen_if}:${listen_port}:8008 --name ${pod_name} && \ +podman pod create --publish ${listen_if}:${listen_port}:8008 --name ${pod_name} && podman run -d --name ${db_container_name} --pod ${pod_name} \ --mount type=volume,src=${dbvolume},dst=/var/lib/postgresql/data/ \ -e POSTGRES_PASSWORD=${GARBAYE_MATRIX_POSTGRES_PASSWORD} \ -e POSTGRES_USER=${container_name} \ -e POSTGRES_DB=${container_name} \ -e POSTGRES_INITDB_ARGS="--encoding=UTF8 --locale=C" \ - ${postgres_image}:${postgres_version} && \ -echo -n "Waiting for PostgreSQL to be ready... " && \ -( podman logs -f synapse-db 2>&1 & ) | grep -q 'database system is ready to accept connections' && \ -echo "OK." && \ + ${postgres_image}:${postgres_version} && +echo -n "Waiting for PostgreSQL to be ready... " && +( podman logs -f synapse-db 2>&1 & ) | grep -q 'database system is ready to accept connections' && +echo "OK." && podman run -d --name ${container_name} --pod ${pod_name} \ --add-host ${db_container_name}:127.0.0.1 \ - --mount type=volume,src=${confvolume},dst=/data ${synapse_image}:${synapse_version} && \ -echo -n "Waiting for background tasks to end... " && \ -( podman logs -f synapse 2>&1 & ) | grep -q 'No more background updates to do' && \ -echo "OK." && \ -podman pod stop ${pod_name} && \ + --mount type=volume,src=${confvolume},dst=/data ${synapse_image}:${synapse_version} && +echo -n "Waiting for background tasks to end... " && +( podman logs -f synapse 2>&1 & ) | grep -q 'No more background updates to do' && +echo "OK." && +podman pod stop ${pod_name} && echo "Done. Pod built and stopped."