We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 72dc4c0 commit 344e7e0Copy full SHA for 344e7e0
lib/core/icingaagent/misc/Start-IcingaAgentDirectorWizard.psm1
@@ -33,13 +33,16 @@ function Start-IcingaAgentDirectorWizard()
33
}
34
35
if ($ForceTemplateKey -eq $FALSE) {
36
- $SelfServiceAPIKey = $LocalAPIKey;
37
- if ([string]::IsNullOrEmpty($SelfServiceAPIKey)) {
+ if ([string]::IsNullOrEmpty($LocalAPIKey)) {
38
$LegacyTokenPath = Join-Path -Path Get-IcingaAgentConfigDirectory -ChildPath 'icingadirector.token';
39
if (Test-Path $LegacyTokenPath) {
40
$SelfServiceAPIKey = Get-Content -Path $LegacyTokenPath;
41
Set-IcingaPowerShellConfig -Path 'IcingaDirector.SelfService.ApiKey' -Value $SelfServiceAPIKey;
+ } else {
42
+ $ForceTemplateKey = $TRUE;
43
44
45
+ $SelfServiceAPIKey = $LocalAPIKey;
46
47
48
0 commit comments