From b6618f762d13fc8f5057e284f970958ff52cfe51 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Fri, 15 Jul 2022 15:44:56 +0200 Subject: [PATCH] less warnings --- scripts/install | 13 ++++++------- scripts/upgrade | 12 ++++++------ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/scripts/install b/scripts/install index 1a22be3..2841310 100644 --- a/scripts/install +++ b/scripts/install @@ -178,18 +178,17 @@ ynh_add_systemd_config --service="$app-sidekiq" --template="$app-sidekiq.service ynh_script_progression --message="Installing acropolis..." pushd "$final_path" - sudo -u $app $ynh_ruby_load_path script/configure_bundler - sudo -u $app $ynh_ruby_load_path bin/bundle config set path 'vendor/bundle' - sudo -u $app $ynh_ruby_load_path bin/bundle install --full-index + ynh_exec_warn_less ynh_exec_as $app $ynh_ruby_load_path script/configure_bundler + ynh_exec_warn_less ynh_exec_as $app $ynh_ruby_load_path bin/bundle config set path 'vendor/bundle' + ynh_exec_warn_less ynh_exec_as $app $ynh_ruby_load_path bin/bundle install --full-index popd ynh_script_progression --message="Preparing the database and create initial admin user..." pushd "$final_path" - rake_exec="sudo -u $app $ynh_ruby_load_path RAILS_ENV=production bin/rake" - ynh_exec_warn_less $rake_exec db:migrate - ynh_exec_warn_less $rake_exec assets:precompile - ynh_exec_warn_less $rake_exec "admin:create[$admin, $email, $password]" + ynh_exec_warn_less ynh_exec_as $app $ynh_ruby_load_path RAILS_ENV=production bin/rake db:migrate + ynh_exec_warn_less ynh_exec_as $app $ynh_ruby_load_path RAILS_ENV=production bin/rake assets:precompile + ynh_exec_warn_less ynh_exec_as $app $ynh_ruby_load_path RAILS_ENV=production bin/rake "admin:create[$admin, $email, $password]" popd #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 28ab1cf..e350a78 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -173,12 +173,12 @@ ynh_add_systemd_config --service="$app-sidekiq" --template="acropolis-sidekiq.se ynh_script_progression --message="Upgrading acropolis..." pushd "$final_path" - sudo -u $app $ynh_ruby_load_path bin/bundle config deployment 'true' - sudo -u $app $ynh_ruby_load_path bin/bundle config without 'development test' - sudo -u $app $ynh_ruby_load_path bin/bundle install -j$(getconf _NPROCESSORS_ONLN) - sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/bundle exec rails assets:clean - sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/bundle exec rails assets:precompile - sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/bundle exec rails db:migrate + ynh_exec_warn_less ynh_exec_as $app $ynh_ruby_load_path bin/bundle config deployment 'true' + ynh_exec_warn_less ynh_exec_as $app $ynh_ruby_load_path bin/bundle config without 'development test' + ynh_exec_warn_less ynh_exec_as $app $ynh_ruby_load_path bin/bundle install -j$(getconf _NPROCESSORS_ONLN) + ynh_exec_warn_less ynh_exec_as $app $ynh_ruby_load_path RAILS_ENV=production bin/rake assets:clean + ynh_exec_warn_less ynh_exec_as $app $ynh_ruby_load_path RAILS_ENV=production bin/rake exec rails assets:precompile + ynh_exec_warn_less ynh_exec_as $app $ynh_ruby_load_path RAILS_ENV=production bin/rake exec rails db:migrate popd #=================================================