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
10
un.sh
10
un.sh
|
|
@ -395,6 +395,7 @@ cmd_service() {
|
|||
local name=""
|
||||
local ports=""
|
||||
local domains=""
|
||||
local service_type=""
|
||||
local bootstrap=""
|
||||
local list=false
|
||||
local info=""
|
||||
|
|
@ -423,6 +424,10 @@ cmd_service() {
|
|||
domains="$2"
|
||||
shift 2
|
||||
;;
|
||||
--type)
|
||||
service_type="$2"
|
||||
shift 2
|
||||
;;
|
||||
--bootstrap)
|
||||
bootstrap="$2"
|
||||
shift 2
|
||||
|
|
@ -555,6 +560,10 @@ cmd_service() {
|
|||
payload=$(echo "$payload" | jq --argjson d "$domains_json" '. + {domains: $d}')
|
||||
fi
|
||||
|
||||
if [[ -n "$service_type" ]]; then
|
||||
payload=$(echo "$payload" | jq --arg t "$service_type" '. + {service_type: $t}')
|
||||
fi
|
||||
|
||||
if [[ -n "$bootstrap" ]]; then
|
||||
if [[ -f "$bootstrap" ]]; then
|
||||
local bootstrap_content=$(cat "$bootstrap")
|
||||
|
|
@ -614,6 +623,7 @@ Service options:
|
|||
--name NAME Service name
|
||||
--ports PORTS Comma-separated ports
|
||||
--domains DOMAINS Custom domains
|
||||
--type TYPE Service type for SRV records (minecraft, mumble, teamspeak, source, tcp, udp)
|
||||
--bootstrap CMD Bootstrap command/file
|
||||
-l, --list List services
|
||||
--info ID Get service details
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue