exit(1)unlessask('Type in the domain of the server to confirm:')==Rails.configuration.x.local_domain
exit(1)unlessask('Type in the domain of the server to confirm:')==Rails.configuration.x.local_domain
say('This operation WILL NOT be reversible.',:yellow)
say(<<~WARNING,:yellow)
say('While the data won\'t be erased locally, the server will be in a BROKEN STATE afterwards.',:yellow)
ThisoperationWILLNOTbereversible.
say('The deletion process itself may take a long time, and will be handled by Sidekiq, so do not shut it down until it has finished (you will be able to re-run this command to see the state of the self-destruct process).',:yellow)
say('To switch Mastodon to self-destruct mode, add the following variable to your evironment (e.g. by adding a line to your `.env.production`) and restart all Mastodon processes:',:green)