Mastodon updaten

Mastodon und Ruby aktualisieren und die Schaltflächen zum Veröffentlichen umbenennen

Ruby aktualisieren

  1. Wechsle zum Benutzer mastodon:
1
su - mastodon
  1. Gehe ins Home-Verzeichnis:
1
cd /home/mastodon
  1. Aktualisiere das ruby-build-Plugin:
1
git -C .rbenv/plugins/ruby-build pull
  1. Installiere die gewünschte Ruby-Version (z. B. 3.0.6) mit jemalloc-Optimierung:
1
RUBY_CONFIGURE_OPTS=--with-jemalloc rbenv install 3.0.6

Dateien aktualisieren

  1. Wechsle zum Benutzer mastodon und öffne eine Shell:
1
2
su - mastodon
bash
  1. Gehe ins Live-Verzeichnis und aktualisiere den Mastodon-Code:
1
2
cd /home/mastodon/live
git fetch && git checkout v4.1.2 --force

Update durchführen

Siehe die Release-Notizen für weitere Befehle: https://github.com/mastodon/mastodon/releases

  1. Installiere die Abhängigkeiten:
1
2
bundle install
yarn install
  1. Führe Datenbank-Migrationen durch:
1
RAILS_ENV=production bundle exec rails db:migrate

“Tröt”-Button anpassen

  1. Ersetze den Text des “Veröffentlichen”-Buttons:
1
2
sed -in s/Veröffentlichen/Tröt/g app/javascript/mastodon/locales/*json
sed -in s/Publish/Toot/g app/javascript/mastodon/locales/*json
  1. Kompiliere die Assets neu:
1
RAILS_ENV=production bundle exec rails assets:precompile

Dienste neu starten

Starte als Root die Mastodon-Dienste neu:

1
systemctl restart mastodon-*.service