Remove custom IP fetching (#10954)

Co-authored-by: CanbiZ (MickLesk) <47820557+MickLesk@users.noreply.github.com>
This commit is contained in:
Slaviša Arežina
2026-01-19 16:33:08 +01:00
committed by GitHub
parent bc53369bab
commit 90f73d1d24
51 changed files with 32 additions and 74 deletions

View File

@@ -44,14 +44,13 @@ $STD sudo -u postgres psql -c "GRANT USAGE, CREATE ON SCHEMA PUBLIC TO $DB_USER;
msg_ok "Set up PostgreSQL"
msg_info "Installing Mattermost"
IPADDRESS=$(hostname -I | awk '{print $1}')
curl -fsSL -o /usr/share/keyrings/mattermost-archive-keyring.gpg https://deb.packages.mattermost.com/pubkey.gpg
sh -c 'curl -fsSL https://deb.packages.mattermost.com/repo-setup.sh | sudo bash -s mattermost' >/dev/null
$STD apt update
$STD apt 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 "/DataSource/c\ \"DataSource\": \"postgres://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME?sslmode=disable&connect_timeout=10\"," \
-e "/SiteURL/c\ \"SiteURL\": \"http://$IPADDRESS:8065\"," /opt/mattermost/config/config.json
-e "/SiteURL/c\ \"SiteURL\": \"http://$LOCAL_IP:8065\"," /opt/mattermost/config/config.json
systemctl enable -q --now mattermost
msg_ok "Installed Mattermost"