Hey 's if there was a tootctl command-line interface for your instance instead of the rake/rails tasks, which commands would you most want to see?

@Gargron auto update? (get latest tag, pre-compile assets, run migrations and restart)

@xefir @kdy Do you run that as root? How are you able to use service restart? It's possible to add a sudo exception for the deployment user but it's a bit finnicky

@Gargron @kdy Because I'm a very lazy sys-admin, I run mastodon on a CT and all run inside at root. I don't care if something being compromised inside it, only mastodon run in it. I'll do something cleaner later :3

@xefir @Gargron Heh, your script sure is smaller than mine (well, I am a bit more verbose too and have to manage some merges)

@kdy @Gargron Why do you have an elasticsearch service attached to this mastodon update script ? Oo

@xefir @Gargron You can use ES.

And since the precompile part uses a lot of ressources, I need to stop Elasticsearch to prevent the server from dying.

@kdy @Gargron Haha. I have too much RAM to spear, I'll test :3 (but that's still less than bare ruby I guess)

@kdy @xefir @Gargron Wow, ES consume way more RAM than I expected. So yeah, I understand why you do kill ES before the assets compilation x)

@Gargron Sorry, I was suggesting to just use "mastodon" as the name of the command.

@Gargron Update, add/remove/verify users, remote remove media, in order of importance.

@Gargron Maybe something that runs the clear cache tasks?

@Gargron Yeah, I couldn't remember if there were other cache commands

@DarckCrystale @Cyphergoat There's like a million different ways Mastodon can be deployed, a command like that could never take it into account.

Just make it work Gargamel !

Just kiddin', your work is amazing, it was only a joke cuz I'm deadly stressed everytime I do an upgrade ;).

@Gargron I already set up bash aliases for most of the rake tasks. #mastoadmin


tootctl federate :)

More seriously, critical stats and admin jobs that are more about core functionality than misc db tasks, etc.

Def like idea of centralizing key things under there:
tootctl stats users
tootctl stats load
tootctl cleanup # disk space, etc

@Gargron tootctl backup && tootctl update && tootctl checkall

$ tootctl update --stats --profiles --avatars --remote-media-cache
or simply:
$ tootctl --update-all-the-shit

I know that is a very costly task to do, but if a server can afford it, let it have a command that can be run with a cron more often

Taking backup and clearing caches would be top of my list.

@Gargron While you're at it - create a rake task that expires unused preview cards?

I'm not sure why I need 223151 of those, using up an additional 8.5G of space...

Sign in to participate in the conversation

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!