chore: remove old abra utility functions
This commit is contained in:
parent
aac97a4aee
commit
3f52b70635
61
abra.sh
61
abra.sh
|
@ -1,62 +1 @@
|
|||
# shellcheck disable=SC2148
|
||||
export ENTRYPOINT_CONF_VERSION=v5
|
||||
#MASTO_APP_DIR="mastodon/public"
|
||||
|
||||
sub_rake() {
|
||||
export OTP_SECRET=$(cat /run/secrets/otp_secret)
|
||||
export SECRET_KEY_BASE=$(cat /run/secrets/secret_key_base)
|
||||
export DB_PASS=$(cat /run/secrets/db_password)
|
||||
|
||||
# shellcheck disable=SC2034
|
||||
abra__service_="streaming"
|
||||
|
||||
# Using streaming for rake since it is the least likely to flap
|
||||
sub_app_run bundle exec rake "$@"
|
||||
}
|
||||
|
||||
sub_tootctl() {
|
||||
export OTP_SECRET=$(cat /run/secrets/otp_secret)
|
||||
export SECRET_KEY_BASE=$(cat /run/secrets/secret_key_base)
|
||||
export DB_PASS=$(cat /run/secrets/db_password)
|
||||
|
||||
# shellcheck disable=SC2034
|
||||
abra__service_="web"
|
||||
|
||||
# Using streaming for rake since it is the least likely to flap
|
||||
sub_app_run bin/tootctl "$@"
|
||||
}
|
||||
|
||||
sub_setup() {
|
||||
info "Setting up mastodon database"
|
||||
silence
|
||||
|
||||
sub_rake "db:setup"
|
||||
unsilence
|
||||
success "Mastodon's database is now up! 'web' and 'sidekiq' services should now stop failing."
|
||||
|
||||
echo "Do you want to create an admin user? (Extremely recommended!)"
|
||||
prompt_confirm
|
||||
read -rp "Username: " USERNAME
|
||||
read -rp "Email: " EMAIL
|
||||
warning "Password will be show on screen. Copy this down somewhere! Abra cannot show you this again!"
|
||||
sub_tootctl accounts create $USERNAME --email $EMAIL --confirmed --role admin
|
||||
success "Admin account created!"
|
||||
success "Mastodon should be setup and ready to go!"
|
||||
}
|
||||
|
||||
# Not working atm
|
||||
# abra_backup_app() {
|
||||
# _abra_backup_dir $MASTO_APP_DIR
|
||||
# }
|
||||
|
||||
# abra_restore_app() {
|
||||
# # shellcheck disable=SC2034
|
||||
# {
|
||||
# abra__src_="-"
|
||||
# abra__dst_=$MASTO_APP_DIR
|
||||
# }
|
||||
|
||||
# zcat "$@" | sub_app_cp
|
||||
|
||||
# success "Restored 'app'"
|
||||
# }
|
||||
|
|
Loading…
Reference in New Issue