diff --git a/podman-matrix/05_freshinstall.sh b/podman-matrix/05_freshinstall.sh index f1dab81..b9885e2 100755 --- a/podman-matrix/05_freshinstall.sh +++ b/podman-matrix/05_freshinstall.sh @@ -9,17 +9,13 @@ ensure_not_root ensure_variables_are_defined "$envvars" -if [[ -d ~/.local/share/containers/storage/volumes/${confvolume} ]]; then - echo "Error : conf volume ${confvolume} already exists. Please remove it first (prune?)." - exit 1 +if [[ ! -d ~/.local/share/containers/storage/volumes/${confvolume} ]]; then + podman volume create matrixdotorg_synapse-data fi -if [[ -d ~/.local/share/containers/storage/volumes/${dbvolume} ]]; then - echo "Error : db volume ${dbvolume} already exists. Please remove it first (prune?)." - exit 1 +if [[ ! -d ~/.local/share/containers/storage/volumes/${dbvolume} ]]; then + podman volume create matrixdotorg_synapse-pgsql fi -podman volume create matrixdotorg_synapse-data && \ -podman volume create matrixdotorg_synapse-pgsql && \ podman run -it --name ${container_name}-generate --mount type=volume,src=matrixdotorg_synapse-data,dst=/data -e SYNAPSE_SERVER_NAME=garbaye.fr -e SYNAPSE_REPORT_STATS=no ${synapse_image}:${synapse_version} generate && \ podman rm ${container_name}-generate && \ podman unshare sed -i -e 's|^#public_baseurl: https://example.com/$|public_baseurl: ${GARBAYE_MATRIX_URL}|g' `podman volume inspect --format '{{ .Mountpoint }}' matrixdotorg_synapse-data`/homeserver.yaml && \ diff --git a/podman-matrix/90_prune.sh b/podman-matrix/90_prune.sh index 6b2cf75..93231ad 100755 --- a/podman-matrix/90_prune.sh +++ b/podman-matrix/90_prune.sh @@ -18,8 +18,8 @@ ensure_systemd_unit_not_exists ${service_name} # remove volume #podman unshare rm -rf ~/${confvolume}/ -podman volume rm matrixdotorg_synapse-data -podman volume rm matrixdotorg_synapse-pgsql +#podman volume rm matrixdotorg_synapse-data +#podman volume rm matrixdotorg_synapse-pgsql # remove images #for image in ${upstream_images} ; do