Add --type option for services across all 42 implementations
Support service_type for SRV records (minecraft, mumble, teamspeak, source, tcp, udp). Each implementation now parses --type and sends service_type in the JSON payload.
This commit is contained in:
parent
564e9e7075
commit
eb5d4ca8bf
42 changed files with 783 additions and 104 deletions
6
un.ps1
6
un.ps1
|
|
@ -231,6 +231,11 @@ function Invoke-Service {
|
|||
$payload["bootstrap"] = $Args[$bIdx + 1]
|
||||
}
|
||||
|
||||
if ($Args -contains "--type") {
|
||||
$tIdx = [array]::IndexOf($Args, "--type")
|
||||
$payload["service_type"] = $Args[$tIdx + 1]
|
||||
}
|
||||
|
||||
$body = $payload | ConvertTo-Json -Depth 5
|
||||
$result = Invoke-Api -Endpoint "/services" -Method "POST" -Body $body
|
||||
Write-Host "`e[32mService created`e[0m"
|
||||
|
|
@ -261,6 +266,7 @@ Session options:
|
|||
Service options:
|
||||
--name NAME Service name
|
||||
--ports PORTS Comma-separated ports
|
||||
--type TYPE Service type (minecraft, mumble, teamspeak, source, tcp, udp)
|
||||
--bootstrap CMD Bootstrap command
|
||||
--list, -l List services
|
||||
--info ID Get service info
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue