Fixes service user to point to local machine if not defined

This commit is contained in:
Lord Hepipud 2019-10-28 17:07:48 +01:00
parent 47b5f2327c
commit 1b424a1fc4

View file

@ -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}';