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

Fix install corepack

This commit is contained in:
Salamandar 2024-05-19 12:49:01 +02:00
parent 86bea30a81
commit e165f55e88

View file

@ -133,12 +133,12 @@ pushd "$install_dir/live"
# This export might be removed in yunohost 12
COREPACK_ENABLE_DOWNLOAD_PROMPT=0 yarn install
echo "SAFETY_ASSURED=1">> "$config"
ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production "$ynh_ruby_load_path" "$ld_preload" bin/bundle exec rails db:migrate --quiet
ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production "$ynh_ruby_load_path" "$ld_preload" bin/bundle exec rails assets:precompile --quiet
ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production COREPACK_ENABLE_DOWNLOAD_PROMPT=0 "$ynh_ruby_load_path" "$ld_preload" bin/bundle exec rails db:migrate --quiet
ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production COREPACK_ENABLE_DOWNLOAD_PROMPT=0 "$ynh_ruby_load_path" "$ld_preload" bin/bundle exec rails assets:precompile --quiet
# Generate vapid keys
ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production "$ynh_ruby_load_path" "$ld_preload" bin/bundle exec rake mastodon:webpush:generate_vapid_key > key.txt
ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production COREPACK_ENABLE_DOWNLOAD_PROMPT=0 "$ynh_ruby_load_path" "$ld_preload" bin/bundle exec rake mastodon:webpush:generate_vapid_key > key.txt
# Create the first admin user
ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production "$ynh_ruby_load_path" "$ld_preload" bin/tootctl accounts create "$admin" --email="$admin_mail" --confirmed --role=Owner > /dev/null
ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production COREPACK_ENABLE_DOWNLOAD_PROMPT=0 "$ynh_ruby_load_path" "$ld_preload" bin/tootctl accounts create "$admin" --email="$admin_mail" --confirmed --role=Owner > /dev/null
popd
# Re-generate config with vapid keys