matrix : gestion automatique de la fin de l'installation

This commit is contained in:
Gitouche 2022-01-28 22:26:01 +01:00
parent f730ef1f6f
commit 3b18be4d6c

View file

@ -20,9 +20,6 @@ if ! podman volume exists ${dbvolume} ; then
exit 1 exit 1
fi fi
# FAIL if pod exists
ensure_pod_not_exists ${pod_name}
podman pod create --publish ${listen_if}:8086:8008 --name ${pod_name} && \ podman pod create --publish ${listen_if}:8086:8008 --name ${pod_name} && \
podman run -d --name ${db_container_name} --pod ${pod_name} \ podman run -d --name ${db_container_name} --pod ${pod_name} \
--mount type=volume,src=${dbvolume},dst=/var/lib/postgresql/data/ \ --mount type=volume,src=${dbvolume},dst=/var/lib/postgresql/data/ \
@ -32,7 +29,9 @@ podman run -d --name ${db_container_name} --pod ${pod_name} \
-e POSTGRES_INITDB_ARGS="--encoding=UTF8 --locale=C" \ -e POSTGRES_INITDB_ARGS="--encoding=UTF8 --locale=C" \
${postgres_image}:${postgres_version} && \ ${postgres_image}:${postgres_version} && \
podman run -d --name ${container_name} --pod ${pod_name} \ podman run -d --name ${container_name} --pod ${pod_name} \
--mount type=volume,src=${confvolume},dst=/data ${synapse_image}:${synapse_version} && \ --mount type=volume,src=${confvolume},dst=/data ${synapse_image}:${synapse_version}
echo "Pod built and starting
run 'podman logs -f synapse synapse-db' to show initialisation status echo "Waiting for background tasks to end..."
then stop pod with 'podman pod stop ${pod_name}'" ( podman logs -f synapse synapse-db 2>&1 & ) | grep -q 'No more background updates to do' && \
podman pod stop ${pod_name} && \
echo "Done. Pod built and stopped."