1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/glitchsoc_ynh.git synced 2024-09-03 19:15:59 +02:00

fix user creation

This commit is contained in:
yalh76 2019-03-21 05:47:44 +01:00
parent 4325834c7a
commit 477783ea53

View file

@ -200,18 +200,7 @@ pushd "$final_path/live"
sudo -u "$app" echo "SAFETY_ASSURED=1">> .env.production sudo -u "$app" echo "SAFETY_ASSURED=1">> .env.production
sudo -u "$app" env PATH=$PATH RAILS_ENV=production /opt/rbenv/versions/2.6.0/bin/bundle exec rails db:migrate --quiet sudo -u "$app" env PATH=$PATH RAILS_ENV=production /opt/rbenv/versions/2.6.0/bin/bundle exec rails db:migrate --quiet
sudo -u "$app" env PATH=$PATH RAILS_ENV=production /opt/rbenv/versions/2.6.0/bin/bundle exec rails assets:precompile --quiet sudo -u "$app" env PATH=$PATH RAILS_ENV=production /opt/rbenv/versions/2.6.0/bin/bundle exec rails assets:precompile --quiet
popd sudo -u "$app" env PATH=$PATH RAILS_ENV=production bin/tootctl accounts create "$admin_mastodon" --email="$admin_mastodon_mail" --confirmed --role=admin > acc.txt
#=================================================
# CREATE MASTODON ADMIN USER
#=================================================
ynh_print_info "Creating Mastodon Admin User..."
# Create user
pushd "$final_path/live"
sudo -u "$app" env PATH=$PATH RAILS_ENV=production bin/tootctl accounts create '$admin_mastodon' --email='$admin_mastodon_mail' > acc.txt
sudo -u "$app" env PATH=$PATH RAILS_ENV=production bin/tootctl accounts modify $admin_mastodon --confirm
sudo -u "$app" env PATH=$PATH RAILS_ENV=production bin/tootctl accounts modify $admin_mastodon --role admin
popd popd
admin_pass=$( tail -1 $final_path/live/acc.txt | head -1 | cut -c 15- ) admin_pass=$( tail -1 $final_path/live/acc.txt | head -1 | cut -c 15- )