From 7a8f223498f4ab73641498e4e46d8edb5f26e205 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc?= Date: Sun, 4 Jul 2021 14:53:36 +0200 Subject: [PATCH] Conservation des chaines de remplacement dans les sed pour remplacer les variables --- podman-matrix/05_freshinstall.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/podman-matrix/05_freshinstall.sh b/podman-matrix/05_freshinstall.sh index e9d3d4f..cadec11 100755 --- a/podman-matrix/05_freshinstall.sh +++ b/podman-matrix/05_freshinstall.sh @@ -20,8 +20,8 @@ if [[ ! -d `podman volume inspect --format '{{ .Mountpoint }}' matrixdotorg_syna 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 fi -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" && \ +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