This commit is contained in:
Freddy Kristiansen 2020-07-28 14:09:52 +02:00
Родитель 38bb68e9db
Коммит bbf032922c
2 изменённых файлов: 12 добавлений и 12 удалений

Просмотреть файл

@ -28,11 +28,11 @@ function Get-MyFilePath([string]$FileName)
$installFromArtifacts = ($appArtifactPath -ne "" -and $platformArtifactPath -ne "")
if ($installFromArtifacts) {
Write-Host "Install from artifacts"
Write-Host "Installing from artifacts"
$navDvdPath = $platformArtifactPath
}
else {
Write-Host "Install from DVD"
Write-Host "Installing from DVD"
}
if (!(Test-Path $navDvdPath -PathType Container)) {
@ -257,7 +257,7 @@ $customConfig.SelectSingleNode("//appSettings/add[@key='SOAPServicesPort']").Val
$customConfig.SelectSingleNode("//appSettings/add[@key='ODataServicesPort']").Value = "7048"
$customConfig.SelectSingleNode("//appSettings/add[@key='DeveloperServicesPort']").Value = "7049"
$customConfig.SelectSingleNode("//appSettings/add[@key='DefaultClient']").Value = "Web"
$customConfig.SelectSingleNode("//appSettings/add[@key='Multitenant']").Value = "$multitenant"
$customConfig.SelectSingleNode("//appSettings/add[@key='Multitenant']").Value = "$multitenant"
$taskSchedulerKeyExists = ($customConfig.SelectSingleNode("//appSettings/add[@key='EnableTaskScheduler']") -ne $null)
if ($taskSchedulerKeyExists) {
$customConfig.SelectSingleNode("//appSettings/add[@key='EnableTaskScheduler']").Value = "false"
@ -295,16 +295,16 @@ if (!$skipDb -and ($multitenant -or $installOnly -or $licenseFilePath -ne "" -or
}
if ($multitenant) {
Copy-NavDatabase -SourceDatabaseName "tenant" -DestinationDatabaseName "default"
Copy-NavDatabase -SourceDatabaseName "tenant" -DestinationDatabaseName "default"
Write-Host "Mounting tenant database"
Mount-NavDatabase -ServerInstance $ServerInstance -TenantId "default" -DatabaseName "default"
Mount-NavDatabase -ServerInstance $ServerInstance -TenantId "default" -DatabaseName "default"
$startTime = [DateTime]::Now
while ([DateTime]::Now.Subtract($startTime).TotalSeconds -le 60) {
$tenantInfo = Get-NAVTenant -ServerInstance $ServerInstance -Tenant "default"
if ($tenantInfo.State -eq "Operational") { break }
Start-Sleep -Seconds 1
}
Write-Host "Tenant is $($TenantInfo.State)"
while ([DateTime]::Now.Subtract($startTime).TotalSeconds -le 60) {
$tenantInfo = Get-NAVTenant -ServerInstance $ServerInstance -Tenant "default"
if ($tenantInfo.State -eq "Operational") { break }
Start-Sleep -Seconds 1
}
Write-Host "Tenant is $($TenantInfo.State)"
}
Write-Host "Stopping Business Central Service Tier"

Просмотреть файл

@ -145,7 +145,7 @@ if ($restartingInstance) {
} elseif ($databaseServer -eq "localhost" -and $databaseInstance -eq "SQLEXPRESS" -and $multitenant) {
if (!(Test-NavDatabase -DatabaseName $databaseName)) {
if (!(Test-NavDatabase -DatabaseName "tenant")) {
Copy-NavDatabase -SourceDatabaseName $databaseName -DestinationDatabaseName "tenant"
Remove-NavDatabase -DatabaseName $databaseName
Write-Host "Exporting Application to $DatabaseName"