Vérification que le pod n'existe pas encore avant installation

This commit is contained in:
Loïc 2021-07-04 21:21:54 +02:00
parent aaab6761df
commit 065d11bfac

View file

@ -18,6 +18,10 @@ if [[ ! -d ~/.local/share/containers/storage/volumes/${dbvolume} ]]; then
echo "Error : conf volume ${dbvolume} does not exists. Consider running 05_freshinstall.sh if this is the first install."
exit 1
fi
# FAIL if pod exists
ensure_pod_not_exists ${pod_name}
podman pod create --publish 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/ \
@ -31,4 +35,3 @@ podman run -d --name ${container_name} --pod ${pod_name} \
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}'"