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