Vérification que le pod n'existe pas encore avant installation
This commit is contained in:
parent
aaab6761df
commit
065d11bfac
|
@ -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."
|
echo "Error : conf volume ${dbvolume} does not exists. Consider running 05_freshinstall.sh if this is the first install."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# FAIL if pod exists
|
||||||
|
ensure_pod_not_exists ${pod_name}
|
||||||
|
|
||||||
podman pod create --publish 8086:8008 --name ${pod_name} && \
|
podman pod create --publish 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/ \
|
||||||
|
@ -31,4 +35,3 @@ podman run -d --name ${container_name} --pod ${pod_name} \
|
||||||
echo "Pod built and starting
|
echo "Pod built and starting
|
||||||
run 'podman logs -f synapse synapse-db' to show initialisation status
|
run 'podman logs -f synapse synapse-db' to show initialisation status
|
||||||
then stop pod with 'podman pod stop ${pod_name}'"
|
then stop pod with 'podman pod stop ${pod_name}'"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue