mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2026-02-03 12:19:29 -05:00
19 lines
568 B
PowerShell
19 lines
568 B
PowerShell
|
|
function Write-IcingaDocumentFile()
|
||
|
|
{
|
||
|
|
param (
|
||
|
|
[string]$Name = $null,
|
||
|
|
[switch]$ClearCache = $FALSE
|
||
|
|
);
|
||
|
|
|
||
|
|
if ([string]::IsNullOrEmpty($Name)) {
|
||
|
|
Write-IcingaConsoleError 'You have to specify an internal name for the documentation object';
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
|
||
|
|
Write-IcingaFileSecure -File $Global:Icinga.Private.Documentation[$Name]['Path'] -Value $Global:Icinga.Private.Documentation[$Name]['Content'].ToString();
|
||
|
|
|
||
|
|
if ($ClearCache) {
|
||
|
|
$Global:Icinga.Private.Documentation.Remove($Name);
|
||
|
|
}
|
||
|
|
}
|