diff --git a/conf/cron b/conf/cron index a15c428..776808b 100644 --- a/conf/cron +++ b/conf/cron @@ -1,5 +1,5 @@ -@daily cd __FINAL_PATH__/live && RAILS_ENV=production __RUBY_PATH__/tootctl media remove -@monthly cd __FINAL_PATH__/live && RAILS_ENV=production __RUBY_PATH__/tootctl media remove-orphans -@monthly cd __FINAL_PATH__/live && RAILS_ENV=production __RUBY_PATH__/tootctl accounts cull -@monthly cd __FINAL_PATH__/live && RAILS_ENV=production __RUBY_PATH__/tootctl statuses remove -@monthly cd __FINAL_PATH__/live && RAILS_ENV=production __RUBY_PATH__/tootctl preview_cards remove +@daily cd __FINAL_PATH__/live && RAILS_ENV=production bin/tootctl media remove +@monthly cd __FINAL_PATH__/live && RAILS_ENV=production bin/tootctl media remove-orphans +@monthly cd __FINAL_PATH__/live && RAILS_ENV=production bin/tootctl accounts cull +@monthly cd __FINAL_PATH__/live && RAILS_ENV=production bin/tootctl statuses remove +@monthly cd __FINAL_PATH__/live && RAILS_ENV=production bin/tootctl preview_cards remove diff --git a/scripts/install b/scripts/install index 208b0d2..977f0b6 100644 --- a/scripts/install +++ b/scripts/install @@ -191,8 +191,8 @@ pushd "$final_path/live" sudo -u $app RAILS_ENV=production $ynh_ruby_load_path $ruby_path/bundle exec rails db:setup --quiet sudo -u $app RAILS_ENV=production $ynh_ruby_load_path $ruby_path/bundle exec rails assets:precompile --quiet sudo -u $app RAILS_ENV=production $ynh_ruby_load_path $ruby_path/bundle exec rake mastodon:webpush:generate_vapid_key > key.txt - sudo -u $app RAILS_ENV=production $ynh_ruby_load_path $ruby_path/tootctl accounts create "$admin" --email="$admin_mail" --confirmed --role=admin > /dev/null - sudo -u $app RAILS_ENV=production $ynh_ruby_load_path $ruby_path/tootctl accounts modify "$admin" --approve + sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/tootctl accounts create "$admin" --email="$admin_mail" --confirmed --role=admin > /dev/null + sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/tootctl accounts modify "$admin" --approve popd vapid_private_key=$(grep -oP "VAPID_PRIVATE_KEY=\K.+" "$final_path/live/key.txt") diff --git a/scripts/upgrade b/scripts/upgrade index 27aaff0..2e8753b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -251,7 +251,7 @@ pushd "$final_path/live" sudo -u $app RAILS_ENV=production $ynh_ruby_load_path $ruby_path/bundle exec rails assets:clean sudo -u $app RAILS_ENV=production $ynh_ruby_load_path $ruby_path/bundle exec rails assets:precompile sudo -u $app RAILS_ENV=production $ynh_ruby_load_path $ruby_path/bundle exec rails db:migrate - sudo -u $app RAILS_ENV=production $ynh_ruby_load_path $ruby_path/tootctl cache clear + sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/tootctl cache clear popd #=================================================