diff --git a/podman-matrix/05_freshinstall.sh b/podman-matrix/05_freshinstall.sh index 72cb1d1..f1dab81 100755 --- a/podman-matrix/05_freshinstall.sh +++ b/podman-matrix/05_freshinstall.sh @@ -22,9 +22,8 @@ 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 run -d --name ${container_name}-generate --mount type=volume,src=matrixdotorg_synapse-data,dst=/data ${synapse_image}:${synapse_version} && \ -podman exec -it ${container_name}-generate bash -c "sed -i -e 's|^#public_baseurl: https://example.com/$|public_baseurl: ${GARBAYE_MATRIX_POSTGRES_PASSWORD}|g' /data/homeserver.yaml && sed -z -i -e 's|database:\n name: sqlite3\n args:\n database: /data/homeserver.db|database:\n name: psycopg2\n args:\n user: synapse\n password: ${GARBAYE_MATRIX_POSTGRES_PASSWORD}\n database: synapse\n host: synapse-db\n port: 5432\n cp_min: 5\n cp_max: 10|g' /data/homeserver.yaml && sed -i -e 's|^#enable_registration: false$|enable_registration: false|g' /data/homeserver.yaml" && \ -podman stop ${container_name}-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 && \ +podman unshare sed -z -i -e 's|database:\n name: sqlite3\n args:\n database: /data/homeserver.db|database:\n name: psycopg2\n args:\n user: synapse\n password: ${GARBAYE_MATRIX_POSTGRES_PASSWORD}\n database: synapse\n host: synapse-db\n port: 5432\n cp_min: 5\n cp_max: 10|g' `podman volume inspect --format '{{ .Mountpoint }}' matrixdotorg_synapse-data`homeserver.yaml && \ +podman unshare sed -i -e 's|^#enable_registration: false$|enable_registration: false|g' `podman volume inspect --format '{{ .Mountpoint }}' matrixdotorg_synapse-data`homeserver.yaml" && \ ${ABSDIR}/10_install.sh