try to autoconfig postgres

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2022-10-08 09:52:56 -05:00
parent 4b39fbf83f
commit c19f88d8cc
2 changed files with 10 additions and 8 deletions

View File

@ -1,7 +1,7 @@
.PHONY: control
VERSION=7.3.0
MINOR=v8
MINOR=v9
help:
@echo

View File

@ -1,5 +1,9 @@
#!/bin/sh
# create the mattermost user and database
su postgres -c 'createdb mattermost'
su postgres -c 'createuser mmuser'
echo
echo systemctl status mattermost.service
echo
@ -8,11 +12,9 @@ echo 'psql'
echo '\\db # will list the tablespaces'
echo '\\dg # will list users'
echo
echo createuser --interactive -P blah
echo createuser -P -s -e jcarr
echo dropuser jcarr
echo '$ psql -U postgres'
echo " db> ALTER USER postgres with password 'your-pass';"
echo "su postgres createdb mattermost"
echo "su postgres createuser mmtest"
echo "ALTER USER mmuser with password 'mmpass';"
echo
echo "CREATE DATABASE mattermost;"
echo "CREATE USER mmuser WITH PASSWORD 'mmpass';"
echo "GRANT ALL PRIVILEGES ON DATABASE mattermost to mmuser;"
echo