Browse Source

fix: [mattermost] on first launch, there are no ``config.json``.

framadate
Valentin Lab 5 years ago
parent
commit
e0b1b7fb1b
  1. 2
      mattermost/hooks/postgres_database-relation-joined

2
mattermost/hooks/postgres_database-relation-joined

@ -18,8 +18,10 @@ services:
MM_USERNAME: $USER
"
if [ -e "$SERVICE_CONFIGSTORE/mattermost/config/config.json" ]; then
sed -ri 's/(^\s+"DataSource": "postgres:[^:]+:)([^@]+)@/\1'"$PASSWORD"'@/' \
"$SERVICE_CONFIGSTORE/mattermost/config/config.json" || exit 1
fi
[ "$control" == "$(relation-get control 2>/dev/null)" ] && exit 0

Loading…
Cancel
Save