mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 07:10:15 -05:00
12 lines
515 B
PowerShell
12 lines
515 B
PowerShell
function Set-IcingaUserPermissions()
|
|
{
|
|
param (
|
|
[string]$IcingaUser = (Get-IcingaServiceUser),
|
|
[switch]$Remove = $FALSE
|
|
);
|
|
|
|
Set-IcingaAcl "$Env:ProgramData\icinga2\etc" -IcingaUser $IcingaUser -Remove:$Remove;
|
|
Set-IcingaAcl "$Env:ProgramData\icinga2\var" -IcingaUser $IcingaUser -Remove:$Remove;
|
|
Set-IcingaAcl (Get-IcingaCacheDir) -IcingaUser $IcingaUser -Remove:$Remove;
|
|
Set-IcingaAcl -Directory (Get-IcingaPowerShellConfigDir) -IcingaUser $IcingaUser -Remove:$Remove;
|
|
}
|