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:
Russell Ballestrini 2025-12-26 08:39:34 -05:00
parent 564e9e7075
commit eb5d4ca8bf
42 changed files with 783 additions and 104 deletions

9
un.tcl
View file

@ -361,6 +361,7 @@ proc cmd_service {args} {
set destroy_id ""
set name ""
set ports ""
set service_type ""
set bootstrap ""
set network ""
set vcpu 0
@ -400,6 +401,10 @@ proc cmd_service {args} {
incr i
set ports [lindex $args $i]
}
--type {
incr i
set service_type [lindex $args $i]
}
--bootstrap {
incr i
set bootstrap [lindex $args $i]
@ -479,6 +484,10 @@ proc cmd_service {args} {
lappend payload ports [::json::write array {*}$port_json]
}
if {$service_type ne ""} {
lappend payload service_type [::json::write string $service_type]
}
if {$bootstrap ne ""} {
# Check if bootstrap is a file
if {[file exists $bootstrap]} {