2022-10-08 09:17:23 -05:00
|
|
|
#!/bin/sh
|
2022-10-08 03:14:24 -05:00
|
|
|
|
2022-10-08 09:52:56 -05:00
|
|
|
# create the mattermost user and database
|
|
|
|
su postgres -c 'createuser mmuser'
|
|
|
|
|
2022-10-08 11:00:31 -05:00
|
|
|
# not sure this or the other one works
|
|
|
|
# su postgres -c 'createdb mattermost'
|
|
|
|
su postgres -c 'createdb -O mmuser mattermost'
|
|
|
|
|
2022-10-08 09:17:23 -05:00
|
|
|
echo
|
|
|
|
echo systemctl status mattermost.service
|
|
|
|
echo
|
|
|
|
echo 'su - postgres'
|
|
|
|
echo 'psql'
|
|
|
|
echo '\\db # will list the tablespaces'
|
|
|
|
echo '\\dg # will list users'
|
|
|
|
echo
|
2022-10-08 09:52:56 -05:00
|
|
|
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;"
|
2022-10-08 09:17:23 -05:00
|
|
|
echo
|