ac69ea2e27
- Move Mastodon setup out of PKGBUILD - Set Mastodon user creation to have a shell - Add PostgreSQL to systemd unit wants - Update install notes - Add sudo as optdepend
19 lines
846 B
Text
19 lines
846 B
Text
post_install() {
|
|
getent passwd mastodon > /dev/null ||
|
|
useradd -rd /var/lib/mastodon mastodon
|
|
chown -R mastodon:mastodon /var/lib/mastodon
|
|
|
|
echo "To setup Mastodon, enable and start PostgreSQL and Redis, create the Mastodon PostgreSQL user using 'sudo -u postgres createuser -d mastodon', run 'sudo su - mastodon', then 'RAILS_ENV=production bundle exec rails mastodon:setup'.
|
|
Enable mastodon.target to have all Mastodon's required services start at boot."
|
|
}
|
|
|
|
post_upgrade() {
|
|
chown -R mastodon:mastodon /var/lib/mastodon
|
|
|
|
echo "To upgrade the database schema, run 'sudo su - mastodon', then 'RAILS_ENV=production bundle exec rails db:migrate'.
|
|
To pre-compile assets, run 'sudo su - mastodon', then 'RAILS_ENV=production bundle exec rails assets:precompile'."
|
|
}
|
|
|
|
post_remove() {
|
|
echo 'You may want to remove the Mastodon user.'
|
|
}
|