YunoHost-Apps / mastodon_ynh

Free, open-source social network for YunoHost
https://joinmastodon.org/
GNU Affero General Public License v3.0
84 stars 36 forks source link

Enhancement: tootctl #237

Closed azbulutlu closed 3 years ago

azbulutlu commented 4 years ago

Right now a new user has to add the Rails_env production manually to the active run and then add it to the .bashrc manually, then add the mastodon/live path to the existing paths to be able to use tootctl from command line.

While most of this are in the mastodon docs, these are several fiddly items to access a tool that is used regularly when maintaining the mastodon server, which might not be as easy to manage for a user with less tech experience.

Would it be feasible to make this setup part of the install or at least part of the instructions for the installation?

nin0-0 commented 3 years ago

my install still can't find the ruby installation

RAILS_ENV=production bin/tootctl help
/usr/bin/env: ‘ruby’: No such file or directory

edit: forgot about my own solution: https://github.com/YunoHost-Apps/mastodon_ynh/issues/225 fyi:

$ cat /etc/cron.d/mastodon
@daily . /etc/profile.d/rbenv.sh && cd /var/www/mastodon/live && RAILS_ENV=production bin/tootctl media remove
@monthly . /etc/profile.d/rbenv.sh && cd /var/www/mastodon/live && RAILS_ENV=production bin/tootctl media remove-orphans
@monthly . /etc/profile.d/rbenv.sh && cd /var/www/mastodon/live && RAILS_ENV=production bin/tootctl accounts cull
@monthly . /etc/profile.d/rbenv.sh && cd /var/www/mastodon/live && RAILS_ENV=production bin/tootctl statuses remove
@monthly . /etc/profile.d/rbenv.sh && cd /var/www/mastodon/live && RAILS_ENV=production bin/tootctl preview_cards remove
ImaCrea commented 3 years ago

stuck here also but can't find how to fix it :/ please help 🙏 for your reference: https://forum.yunohost.org/t/souci-de-federation-mastodon/13679/2

edit: it's alright, found how to make it work thanks to @nin0-0 . cf #225 (but still, complicated so I'm a big supporter of your idea @azbulutlu )

ImaCrea commented 3 years ago

yay!