mirror of
https://github.com/actions/runner-images.git
synced 2025-12-12 20:26:49 +00:00
[macOS] Implement new directories hierarchy (#8741)
This commit is contained in:
committed by
GitHub
parent
5d40b1e213
commit
8d6a01b370
36
images/macos/scripts/docs-gen/SoftwareReport.WebServers.psm1
Normal file
36
images/macos/scripts/docs-gen/SoftwareReport.WebServers.psm1
Normal file
@@ -0,0 +1,36 @@
|
||||
function Get-ApacheVersion {
|
||||
$name = "httpd"
|
||||
$port = 80
|
||||
$version = brew list $name --versions | Take-Part -Part 1
|
||||
$serviceStatus = (brew services list) -match $name | Take-Part -Part 1
|
||||
$configFile = "$(brew --prefix)/etc/httpd/httpd.conf"
|
||||
return [PsCustomObject]@{
|
||||
"Name" = $name
|
||||
"Version" = $version
|
||||
"ConfigFile" = $configFile
|
||||
"ServiceStatus" = $serviceStatus
|
||||
"ListenPort" = $port
|
||||
}
|
||||
}
|
||||
|
||||
function Get-NginxVersion {
|
||||
$name = "nginx"
|
||||
$port = 80
|
||||
$version = brew list $name --versions | Take-Part -Part 1
|
||||
$serviceStatus = (brew services list) -match $name | Take-Part -Part 1
|
||||
$configFile = "$(brew --prefix)/etc/nginx/nginx.conf"
|
||||
return [PsCustomObject]@{
|
||||
"Name" = $name
|
||||
"Version" = $version
|
||||
"ConfigFile" = $configFile
|
||||
"ServiceStatus" = $serviceStatus
|
||||
"ListenPort" = $port
|
||||
}
|
||||
}
|
||||
|
||||
function Build-WebServersSection {
|
||||
return @(
|
||||
(Get-ApacheVersion),
|
||||
(Get-NginxVersion)
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user