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
1 changed files with 6 additions and 7 deletions

View File

@ -20,9 +20,6 @@ if ! podman volume exists ${dbvolume} ; then
exit 1
fi
# FAIL if pod exists
ensure_pod_not_exists ${pod_name}
podman pod create --publish ${listen_if}:8086:8008 --name ${pod_name} && \
podman run -d --name ${db_container_name} --pod ${pod_name} \
--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" \
${postgres_image}:${postgres_version} && \
podman run -d --name ${container_name} --pod ${pod_name} \
--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
then stop pod with 'podman pod stop ${pod_name}'"
--mount type=volume,src=${confvolume},dst=/data ${synapse_image}:${synapse_version}
echo "Waiting for background tasks to end..."
( 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."