mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
Fixes service user to point to local machine if not defined
This commit is contained in:
parent
47b5f2327c
commit
1b424a1fc4
1 changed files with 4 additions and 0 deletions
|
|
@ -10,6 +10,10 @@ function Set-IcingaAgentServiceUser()
|
||||||
return $FALSE;
|
return $FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($User.Contains('\') -eq $FALSE) {
|
||||||
|
$User = [string]::Format('.\{0}', $User);
|
||||||
|
}
|
||||||
|
|
||||||
$ArgString = 'config icinga2 obj= "{0}" password="{1}"';
|
$ArgString = 'config icinga2 obj= "{0}" password="{1}"';
|
||||||
if($null -eq $Password) {
|
if($null -eq $Password) {
|
||||||
$ArgString = 'config icinga2 obj= "{0}"{1}';
|
$ArgString = 'config icinga2 obj= "{0}"{1}';
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue