mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
Changed name for New/Remove-Icinga-Service Cmdlet
Fixes #8 which adds a proper naming for installing / uninstalling the Icinga Service for the PowerShell module
This commit is contained in:
parent
d2c9ef9b5b
commit
27c2cb8518
4 changed files with 7 additions and 7 deletions
|
|
@ -13,8 +13,8 @@ Set-Variable -Name Icinga2 -Option Constant -Value @{
|
|||
'Start-Icinga-Service',
|
||||
'Stop-Icinga-Service',
|
||||
'Restart-Icinga-Service',
|
||||
'New-Icinga-Service',
|
||||
'Remove-Icinga-Service',
|
||||
'Install-Icinga-Service',
|
||||
'Uninstall-Icinga-Service',
|
||||
'Install-Icinga',
|
||||
'Get-Icinga-Setup',
|
||||
'Start-Icinga-Daemon',
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ and the binary name is
|
|||
Now lets install the service with the help of the PowerShell Module:
|
||||
|
||||
```powershell
|
||||
New-Icinga-Service -IcingaServicePath 'C:\Program Files\Icinga Windows Service\icinga-service.exe'
|
||||
Install-Icinga-Service -IcingaServicePath 'C:\Program Files\Icinga Windows Service\icinga-service.exe'
|
||||
```
|
||||
|
||||
You can validate if the service has been installed properly by using the Get Service Cmdlet:
|
||||
|
|
@ -44,6 +44,6 @@ Of course there are more Cmdlets available, making the management of this Icinga
|
|||
* Start-Icinga-Service
|
||||
* Stop-Icinga-Service
|
||||
* Restart-Icinga-Service
|
||||
* Remove-Icinga-Service
|
||||
* Uninstall-Icinga-Service
|
||||
|
||||
**Note:** If you run the PowerShell Module as service, both the Daemon and Checker component will be started. To prevent external access to the Daemon, you should ensure to block port **5891** on this host.
|
||||
|
|
@ -25,7 +25,7 @@ Description = 'Icinga 2 Windows Agent Module, which allows to entirely monitor t
|
|||
PowerShellVersion = '3.0'
|
||||
|
||||
# Aus diesem Modul zu exportierende Funktionen. Um optimale Leistung zu erzielen, verwenden Sie keine Platzhalter und löschen den Eintrag nicht. Verwenden Sie ein leeres Array, wenn keine zu exportierenden Funktionen vorhanden sind.
|
||||
FunctionsToExport = @( 'Start-Icinga-Checker', 'Stop-Icinga-Checker', 'Get-Icinga-Lib', 'Get-Icinga-Object', 'Get-Icinga-Service', 'Start-Icinga-Service', 'Stop-Icinga-Service', 'Restart-Icinga-Service', 'New-Icinga-Service', 'Remove-Icinga-Service', 'Get-Icinga-Setup', 'Install-Icinga', 'Start-Icinga-Daemon', 'Stop-Icinga-Daemon', 'Icinga-Client', 'Get-Icinga-Command', 'New-Icinga-Monitoring', 'Get-Icinga-Counter', 'Get-Icinga-Config', 'Set-Icinga-Config', 'Remove-Icinga-Config', 'New-Icinga-Config' )
|
||||
FunctionsToExport = @( 'Start-Icinga-Checker', 'Stop-Icinga-Checker', 'Get-Icinga-Lib', 'Get-Icinga-Object', 'Get-Icinga-Service', 'Start-Icinga-Service', 'Stop-Icinga-Service', 'Restart-Icinga-Service', 'Install-Icinga-Service', 'Uninstall-Icinga-Service', 'Get-Icinga-Setup', 'Install-Icinga', 'Start-Icinga-Daemon', 'Stop-Icinga-Daemon', 'Icinga-Client', 'Get-Icinga-Command', 'New-Icinga-Monitoring', 'Get-Icinga-Counter', 'Get-Icinga-Config', 'Set-Icinga-Config', 'Remove-Icinga-Config', 'New-Icinga-Config' )
|
||||
|
||||
# Aus diesem Modul zu exportierende Cmdlets. Um optimale Leistung zu erzielen, verwenden Sie keine Plat'zhalter und löschen den Eintrag nicht. Verwenden Sie ein leeres Array, wenn keine zu exportierenden Cmdlets vorhanden sind.
|
||||
CmdletsToExport = @()
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ function Restart-Icinga-Service()
|
|||
$Icinga2.Service.Restart();
|
||||
}
|
||||
|
||||
function New-Icinga-Service()
|
||||
function Install-Icinga-Service()
|
||||
{
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
|
|
@ -50,7 +50,7 @@ function New-Icinga-Service()
|
|||
$Icinga2.Service.Install($IcingaServicePath);
|
||||
}
|
||||
|
||||
function Remove-Icinga-Service()
|
||||
function Uninstall-Icinga-Service()
|
||||
{
|
||||
$Icinga2.Service.Uninstall();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue