mirror of
https://github.com/actions/runner-images.git
synced 2025-12-14 05:07:02 +00:00
Update Ubuntu documentation to include mono web-server (#2892)
* Update Ubuntu documentation to include mono web-server * apply to Ubuntu 20.04 only
This commit is contained in:
@@ -28,14 +28,34 @@ function Get-NginxVersion {
|
||||
}
|
||||
}
|
||||
|
||||
function Get-Xsp4Version {
|
||||
$name = "mono-xsp4"
|
||||
$port = (grep '^port=' /etc/default/mono-xsp4).Split('=')[1]
|
||||
$version = (dpkg-query --showformat='${Version}' --show mono-xsp4).Split('-')[0]
|
||||
$serviceStatus = systemctl show -p ActiveState --value mono-xsp4
|
||||
$configFile = "/etc/default/mono-xsp4"
|
||||
return [PsCustomObject]@{
|
||||
"Name" = $name
|
||||
"Version" = $version
|
||||
"ConfigFile" = $configFile
|
||||
"ServiceStatus" = $serviceStatus
|
||||
"ListenPort" = $port
|
||||
}
|
||||
}
|
||||
|
||||
function Build-WebServersSection {
|
||||
$servers = @(
|
||||
(Get-ApacheVersion),
|
||||
(Get-NginxVersion)
|
||||
)
|
||||
if (Test-IsUbuntu20) {
|
||||
$servers += (Get-Xsp4Version)
|
||||
}
|
||||
|
||||
$output = ""
|
||||
$output += New-MDHeader "Web Servers" -Level 3
|
||||
$output += @(
|
||||
(Get-ApacheVersion),
|
||||
(Get-NginxVersion)
|
||||
) | Sort-Object Name | New-MDTable
|
||||
|
||||
$output += $servers | Sort-Object Name | New-MDTable
|
||||
$output += New-MDNewLine
|
||||
|
||||
return $output
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user