diff --git a/lib/core/framework/Restart-IcingaService.psm1 b/lib/core/framework/Restart-IcingaService.psm1 new file mode 100644 index 0000000..ce0f009 --- /dev/null +++ b/lib/core/framework/Restart-IcingaService.psm1 @@ -0,0 +1,10 @@ +function Restart-IcingaService() +{ + param( + $Service + ); + + if (Get-Service $Service -ErrorAction SilentlyContinue) { + Restart-Service $Service; + } +} diff --git a/lib/core/framework/Start-IcingaService.psm1 b/lib/core/framework/Start-IcingaService.psm1 new file mode 100644 index 0000000..ec4b5a7 --- /dev/null +++ b/lib/core/framework/Start-IcingaService.psm1 @@ -0,0 +1,10 @@ +function Start-IcingaService() +{ + param( + $Service + ); + + if (Get-Service $Service -ErrorAction SilentlyContinue) { + Start-Service $Service; + } +} diff --git a/lib/core/framework/Stop-IcingaService.psm1 b/lib/core/framework/Stop-IcingaService.psm1 new file mode 100644 index 0000000..ef91fa8 --- /dev/null +++ b/lib/core/framework/Stop-IcingaService.psm1 @@ -0,0 +1,10 @@ +function Stop-IcingaService() +{ + param( + $Service + ); + + if (Get-Service $Service -ErrorAction SilentlyContinue) { + Stop-Service $Service; + } +}