Do not restart after install, instead stop and restart the runtime. Also signin the admin user after install.

This commit is contained in:
Bjarke Berg
2021-05-18 19:19:58 +02:00
parent f63c85a16c
commit 4c78702da0
22 changed files with 122 additions and 73 deletions

View File

@@ -0,0 +1,25 @@
using Microsoft.AspNetCore.Routing;
using Umbraco.Cms.Web.BackOffice.Install;
namespace Umbraco.Extensions
{
public static class BackofficeLinkGeneratorExtensions
{
/// <summary>
/// Returns the URL for the installer
/// </summary>
public static string GetInstallerUrl(this LinkGenerator linkGenerator)
=> linkGenerator.GetPathByAction(nameof(InstallController.Index), ControllerExtensions.GetControllerName<InstallController>(), new { area = Cms.Core.Constants.Web.Mvc.InstallArea });
/// <summary>
/// Returns the URL for the installer api
/// </summary>
public static string GetInstallerApiUrl(this LinkGenerator linkGenerator)
=> linkGenerator.GetPathByAction(
nameof(InstallApiController.GetSetup),
ControllerExtensions.GetControllerName<InstallApiController>(),
new { area = Cms.Core.Constants.Web.Mvc.InstallArea }).TrimEnd(nameof(InstallApiController.GetSetup));
}
}