From 2d59cde6387fa251f5c708647ad8f41766683fff Mon Sep 17 00:00:00 2001 From: Gitouche <26656-gitouche@users.noreply.framagit.org> Date: Fri, 28 Jul 2023 17:28:20 +0200 Subject: [PATCH] podman-matrix : cleanup --- functions.sh | 2 +- podman-matrix/05_freshinstall.sh | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/functions.sh b/functions.sh index d67f8f9..c97a19f 100644 --- a/functions.sh +++ b/functions.sh @@ -61,7 +61,7 @@ podman_unshare_sed_in_place () { # sed or die trying sed_in_place_multiline () { - ${podman_unshare} grep -z -q "${1}" "${3}" + ${podman_unshare} grep -P -z -q "${1}" "${3}" if [ $? -eq 0 ]; then ${podman_unshare} sed -z -i -e "s|${1}|${2}|g" ${3} else diff --git a/podman-matrix/05_freshinstall.sh b/podman-matrix/05_freshinstall.sh index a2e36de..aa67749 100755 --- a/podman-matrix/05_freshinstall.sh +++ b/podman-matrix/05_freshinstall.sh @@ -20,9 +20,7 @@ if ! podman image exists ${synapse_image}:${synapse_version}; then fi podman volume create ${confvolume} && podman volume create ${dbvolume} && -podman container run -it --name ${container_name}-generate --mount type=volume,src=${confvolume},dst=/data -e SYNAPSE_SERVER_NAME=${GARBAYE_MATRIX_DOMAIN} -e SYNAPSE_REPORT_STATS=no ${synapse_image}:${synapse_version} generate && -podman container rm ${container_name}-generate && +podman container run -it --rm --name ${container_name}-generate --mount type=volume,src=${confvolume},dst=/data -e SYNAPSE_SERVER_NAME=${GARBAYE_MATRIX_DOMAIN} -e SYNAPSE_REPORT_STATS=no ${synapse_image}:${synapse_version} generate && podman_unshare_sed_in_place "^pid_file: /data/homeserver.pid$" "pid_file: /data/homeserver.pid\npublic_baseurl: ${GARBAYE_MATRIX_URL}\nallow_public_rooms_over_federation: true" `get_podman_volume_path ${confvolume}`/homeserver.yaml && -podman_unshare_sed_in_place_multiline "database:\n name: sqlite3\n args:\n database: /data/homeserver.db" "database:\n name: psycopg2\n args:\n user: synapse\n password: ${GARBAYE_MATRIX_POTGRES_PASSWORD}\n database: synapse\n host: synapse-db\n port: 5432\n cp_min: 5\n cp_max: 10" `get_podman_volume_path ${confvolume}`/homeserver.yaml +podman_unshare_sed_in_place_multiline "database:\n name: sqlite3\n args:\n database: /data/homeserver.db" "database:\n name: psycopg2\n args:\n user: synapse\n password: ${GARBAYE_MATRIX_POTGRES_PASSWORD}\n database: synapse\n host: synapse-db\n port: 5432\n cp_min: 5\n cp_max: 10" `get_podman_volume_path ${confvolume}`/homeserver.yaml && ${ABSDIR}/10_install.sh -