From 317903a3e95f321b23ff4cb4031c72250293d9db Mon Sep 17 00:00:00 2001 From: Dracentis <24703977+Dracentis@users.noreply.github.com> Date: Wed, 29 Jan 2025 19:04:42 -0500 Subject: [PATCH] Fixed sed command in mattermost-install.sh --- install/mattermost-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/mattermost-install.sh b/install/mattermost-install.sh index 9e71671b..2126ba08 100644 --- a/install/mattermost-install.sh +++ b/install/mattermost-install.sh @@ -46,9 +46,9 @@ sh -c 'curl -o- https://deb.packages.mattermost.com/repo-setup.sh | sudo bash -s $STD apt-get update $STD apt-get install -y mattermost $STD install -C -m 600 -o mattermost -g mattermost /opt/mattermost/config/config.defaults.json /opt/mattermost/config/config.json -sed -i -e "s|^\"DriverName\":.*|\"DriverName\": \"postgres\",|" \ - -e "s|^DB_CONNECTION=$|DB_CONNECTION=\"postgres://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME?sslmode=disable&connect_timeout=10\"|" \ - -e "s|^\"SiteUrl\":.*|\"SiteUrl\": \"http://$IPADDRESS:8384\"|" /opt/mattermost/config/config.json +sed -i -e "/DriverName/c\ \"DriverName\": \"postgres\"," \ + -e "/DataSource/c\ \"DataSource\": \"postgres://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME?sslmode=disable&connect_timeout=10\"," \ + -e "/SiteUrl/c\ \"SiteUrl\": \"http://$IPADDRESS\"," /opt/mattermost/config/config.json $STD systemctl enable mattermost.service $STD systemctl start mattermost.service msg_ok "Installed Mattermost"