From 9aff0029d138495a47cbf87fadeb04eb9715f7bb Mon Sep 17 00:00:00 2001 From: Gitouche <26656-gitouche@users.noreply.framagit.org> Date: Sun, 13 Nov 2022 14:49:38 +0100 Subject: [PATCH] Matrix : fix creation/suppression du reseau --- podman-matrix/10_install.sh | 4 +++- podman-matrix/80_destroy.sh | 10 ---------- podman-matrix/80_destroy_pod.sh | 1 + 3 files changed, 4 insertions(+), 11 deletions(-) delete mode 100755 podman-matrix/80_destroy.sh create mode 120000 podman-matrix/80_destroy_pod.sh diff --git a/podman-matrix/10_install.sh b/podman-matrix/10_install.sh index 3b67a32..bbdcf1a 100755 --- a/podman-matrix/10_install.sh +++ b/podman-matrix/10_install.sh @@ -24,7 +24,9 @@ if ! podman image pull ${synapse_image}:${synapse_version}; then podman image pull ${synapse_image}:${synapse_version} || exit 1 fi podman pull ${postgres_image}:${postgres_version} && -podman network create ${project_name}_default && +if ! podman network exists ${project_name}_default; then + podman network create ${project_name}_default +fi podman pod create --name ${pod_name} --infra=true --infra-name=${project_name}_infra --share='' && podman run -d --name ${db_container_name} --pod ${pod_name} --requires=${project_name}_infra --net ${project_name}_default \ --mount type=volume,src=${dbvolume},dst=/var/lib/postgresql/data/ \ diff --git a/podman-matrix/80_destroy.sh b/podman-matrix/80_destroy.sh deleted file mode 100755 index b452ac2..0000000 --- a/podman-matrix/80_destroy.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -ABSDIR="$( dirname "$(readlink -f -- "$0")" )" -source ${ABSDIR}/../functions.sh -source ${ABSDIR}/vars.sh - -# Run regular prune script for pods -source ${ABSDIR}/../_podman-common/80_destroy_pod.sh && -# Remove pod network -podman network rm ${project_name}_default diff --git a/podman-matrix/80_destroy_pod.sh b/podman-matrix/80_destroy_pod.sh new file mode 120000 index 0000000..1b8a370 --- /dev/null +++ b/podman-matrix/80_destroy_pod.sh @@ -0,0 +1 @@ +../_podman-common/80_destroy_pod.sh \ No newline at end of file