2022-11-05 03:54:06 +00:00
|
|
|
#!/bin/sh
|
2023-06-22 03:36:51 +00:00
|
|
|
set -eu
|
2022-11-05 03:54:06 +00:00
|
|
|
|
2023-06-22 03:36:51 +00:00
|
|
|
if [ "${0##*.}" = 'post-upgrade' ]; then
|
|
|
|
cat >&2 <<-EOF
|
|
|
|
*
|
|
|
|
* To finish Mastodon upgrade run:
|
|
|
|
*
|
|
|
|
* mastodon-rails db:migrate
|
|
|
|
*
|
|
|
|
EOF
|
|
|
|
else
|
|
|
|
cat >&2 <<-EOF
|
|
|
|
*
|
|
|
|
* 1. Adjust settings in /etc/mastodon.conf
|
|
|
|
*
|
|
|
|
* 2. Create database for Mastodon:
|
|
|
|
*
|
|
|
|
* psql -c "CREATE ROLE mastodon PASSWORD 'top-secret' INHERIT LOGIN;"
|
|
|
|
* psql -c "CREATE DATABASE mastodon OWNER mastodon ENCODING 'UTF-8';"
|
|
|
|
* psql -d mastodon -c "CREATE EXTENSION pg_trgm; CREATE EXTENSION btree_gist;"
|
|
|
|
* psql -c "ALTER DATABASE name OWNER TO new_owner;"
|
|
|
|
*
|
|
|
|
* 3. Run "mastodon-rake db:migrate"
|
|
|
|
*
|
|
|
|
EOF
|
|
|
|
fi
|