diff --git a/scripts/install b/scripts/install index 14c1853..a521a4e 100644 --- a/scripts/install +++ b/scripts/install @@ -123,10 +123,10 @@ pushd "$install_dir/live" gem update --system gem install bundler --no-document - ynh_exec_as_app ruby_load_path" $ld_preload bin/bundle config deployment 'true' - ynh_exec_as_app ruby_load_path" $ld_preload bin/bundle config without 'development test' - ynh_exec_as_app ruby_load_path" $ld_preload bin/bundle config set force_ruby_platform true - ynh_exec_as_app ruby_load_path" $ld_preload bin/bundle install -j$(getconf _NPROCESSORS_ONLN) + ynh_exec_as_app $ld_preload bin/bundle config deployment 'true' + ynh_exec_as_app $ld_preload bin/bundle config without 'development test' + ynh_exec_as_app $ld_preload bin/bundle config set force_ruby_platform true + ynh_exec_as_app $ld_preload bin/bundle install -j$(getconf _NPROCESSORS_ONLN) # Building assets @@ -134,12 +134,12 @@ pushd "$install_dir/live" # This export might be removed in yunohost 12 yarn install echo "SAFETY_ASSURED=1">> "$config" - ynh_exec_as_app RAILS_ENV=production ruby_load_path" $ld_preload bin/bundle exec rails db:migrate --quiet 2>&1 - ynh_exec_as_app RAILS_ENV=production ruby_load_path" $ld_preload bin/bundle exec rails assets:precompile --quiet 2>&1 + ynh_exec_as_app RAILS_ENV=production $ld_preload bin/bundle exec rails db:migrate --quiet 2>&1 + ynh_exec_as_app RAILS_ENV=production $ld_preload bin/bundle exec rails assets:precompile --quiet 2>&1 # Generate vapid keys - ynh_exec_as_app RAILS_ENV=production ruby_load_path" $ld_preload bin/bundle exec rake mastodon:webpush:generate_vapid_key > key.txt 2>&1 + ynh_exec_as_app RAILS_ENV=production $ld_preload bin/bundle exec rake mastodon:webpush:generate_vapid_key > key.txt 2>&1 # Create the first admin user - ynh_exec_as_app RAILS_ENV=production ruby_load_path" $ld_preload bin/tootctl accounts create "$admin" --email="$admin_mail" --confirmed --role=Owner > /dev/null 2>&1 + ynh_exec_as_app RAILS_ENV=production $ld_preload bin/tootctl accounts create "$admin" --email="$admin_mail" --confirmed --role=Owner > /dev/null 2>&1 popd # Re-generate config with vapid keys @@ -150,8 +150,6 @@ ynh_app_setting_set --key=vapid_public_key --value="$vapid_public_key" ynh_safe_rm "$install_dir/live/key.txt" ynh_delete_file_checksum "$config" ynh_config_add --template=".env.production.sample" --destination="$config" -#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 400 "$config" -#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown $app:$app "$config" #================================================= # SYSTEM CONFIGURATION diff --git a/scripts/restore b/scripts/restore index 396771f..c963384 100644 --- a/scripts/restore +++ b/scripts/restore @@ -60,7 +60,7 @@ pushd "$install_dir/live" gem update --system gem install bundler --no-document - ynh_exec_as_app ruby_load_path" $ld_preload bin/bundle install --redownload -j"$(nproc)" + ynh_exec_as_app $ld_preload bin/bundle install --redownload -j"$(nproc)" # This export might be removed in yunohost 12 diff --git a/scripts/upgrade b/scripts/upgrade index 75197fa..f038f4a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -108,21 +108,21 @@ pushd "$install_dir/live" gem update --system gem install bundler --no-document - ynh_exec_as_app ruby_load_path" $ld_preload bin/bundle config deployment 'true' - ynh_exec_as_app ruby_load_path" $ld_preload bin/bundle config without 'development test' - ynh_exec_as_app ruby_load_path" $ld_preload bin/bundle config set force_ruby_platform true --quiet - ynh_exec_as_app ruby_load_path" $ld_preload bin/bundle install -j$(getconf _NPROCESSORS_ONLN) + ynh_exec_as_app $ld_preload bin/bundle config deployment 'true' + ynh_exec_as_app $ld_preload bin/bundle config without 'development test' + ynh_exec_as_app $ld_preload bin/bundle config set force_ruby_platform true --quiet + ynh_exec_as_app $ld_preload bin/bundle install -j$(getconf _NPROCESSORS_ONLN) # This export might be removed in yunohost 12 corepack enable yarn install if [ -d "$install_dir/live/public/assets" ]; then - ynh_exec_as_app RAILS_ENV=production ruby_load_path" $ld_preload bin/bundle exec rails assets:clean 2>&1 + ynh_exec_as_app RAILS_ENV=production $ld_preload bin/bundle exec rails assets:clean 2>&1 fi - ynh_exec_as_app RAILS_ENV=production ruby_load_path" $ld_preload bin/bundle exec rails assets:precompile 2>&1 - ynh_exec_as_app RAILS_ENV=production ruby_load_path" $ld_preload bin/bundle exec rails db:migrate 2>&1 - ynh_exec_as_app RAILS_ENV=production ruby_load_path" $ld_preload bin/tootctl cache clear 2>&1 + ynh_exec_as_app RAILS_ENV=production $ld_preload bin/bundle exec rails assets:precompile 2>&1 + ynh_exec_as_app RAILS_ENV=production $ld_preload bin/bundle exec rails db:migrate 2>&1 + ynh_exec_as_app RAILS_ENV=production $ld_preload bin/tootctl cache clear 2>&1 } popd @@ -134,8 +134,8 @@ ynh_script_progression "Applying migrations..." pushd "$install_dir/live" { - ynh_exec_as_app RAILS_ENV=production ruby_load_path" $ld_preload bin/bundle exec rails db:migrate 2>&1 - ynh_exec_as_app RAILS_ENV=production ruby_load_path" $ld_preload bin/tootctl cache clear 2>&1 + ynh_exec_as_app RAILS_ENV=production $ld_preload bin/bundle exec rails db:migrate 2>&1 + ynh_exec_as_app RAILS_ENV=production $ld_preload bin/tootctl cache clear 2>&1 } popd