aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authoranmol26s <github@datamol.org>2018-12-26 08:11:35 +0530
committeranmol26s <github@datamol.org>2018-12-26 08:11:35 +0530
commit925cc8205045bb6ceebcaa7bd385a43be63b541e (patch)
treed54e1bf90ea0a9873c082e0cde2d0ca68a029c04 /scripts
parenta350fef6a82244e1206bac9da6a77fade378fcb9 (diff)
downloadmastodon_ynh-925cc8205045bb6ceebcaa7bd385a43be63b541e.tar.gz
mastodon_ynh-925cc8205045bb6ceebcaa7bd385a43be63b541e.tar.bz2
mastodon_ynh-925cc8205045bb6ceebcaa7bd385a43be63b541e.zip
Fix:command to make user admin
Diffstat (limited to 'scripts')
-rw-r--r--scripts/install12
1 files changed, 7 insertions, 5 deletions
diff --git a/scripts/install b/scripts/install
index da834f5..7b3e789 100644
--- a/scripts/install
+++ b/scripts/install
@@ -209,10 +209,10 @@ ynh_replace_string "#SMTP_OPENSSL_VERIFY_MODE=peer" "SMTP_OPENSSL_V
cd "$final_path/live"
su mastodon <<INSTALL
$final_path/.rbenv/versions/2.5.3/bin/gem install bundler
- $final_path/live/bin/bundle install -j$(getconf _NPROCESSORS_ONLN) --deployment --without development test --quiet
+ $final_path/live/bin/bundle install -j$(getconf _NPROCESSORS_ONLN) --deployment --without development test
yarn install --production --no-progress --non-interactive --silent
echo "SAFETY_ASSURED=1">> .env.production
- RAILS_ENV=production $final_path/live/bin/bundle exec rails db:migrate --quiet
+ RAILS_ENV=production $final_path/live/bin/bundle exec rails db:setup --quiet
RAILS_ENV=production $final_path/live/bin/bundle exec rails assets:precompile --quiet
INSTALL
)
@@ -222,6 +222,8 @@ INSTALL
#=================================================
# Create a dedicated systemd config
+ynh_replace_string "__PORT_WEB__" "$port_web" "../conf/mastodon-web.service"
+ynh_replace_string "__PORT_STREAM__" "$port_stream" "../conf/mastodon-streaming.service"
ynh_add_systemd_config "$app-web" "mastodon-web.service"
ynh_add_systemd_config "$app-sidekiq" "mastodon-sidekiq.service"
ynh_add_systemd_config "$app-streaming" "mastodon-streaming.service"
@@ -237,7 +239,7 @@ account = Account.create!(username: '$admin_mastodon')
user = User.create!(email: '$admin_mastodon_mail', password: '$admin_pass', account: account)
CREATEUSER
su mastodon <<SETADMIN
-RAILS_ENV=production bin/tootctl accounts modify $admin_mastodon --confirmed
+RAILS_ENV=production bin/tootctl accounts modify $admin_mastodon --confirm
RAILS_ENV=production bin/tootctl accounts modify $admin_mastodon --role admin
SETADMIN
)
@@ -286,8 +288,8 @@ systemctl reload nginx
message="Mastodon was successfully installed :)
Please open 'https://$domain$path_url'
-The admin username is: '$admin_mastodon_mail'
-The admin password is: '$admin_pass'
+The admin username is: $admin_mastodon_mail
+The admin password is: $admin_pass
If you facing an issue or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/mastodon_ynh"
ynh_send_readme_to_admin "$message" "$admin_mastodon"