You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.1 KiB
42 lines
1.1 KiB
1 year ago
|
|
||
|
proc listmap {commandlist list} {
|
||
|
tailcall lmap item $list $commandlist
|
||
|
}
|
||
|
|
||
|
proc pipe_webpub {} {
|
||
|
pipeset subpipe % .= {
|
||
|
pipeswitch {
|
||
|
pipecase \
|
||
|
.= val [lindex $switchargs 0] \
|
||
|
|> {string trimright $data .} |server> {split $data .} \
|
||
|
|> 'webpub.net'.= {
|
||
|
join [lrange $data 1 2] .
|
||
|
} \
|
||
|
|> {
|
||
|
list type internal server $server
|
||
|
}
|
||
|
|
||
|
pipecase .= val [list type external server [lindex $switchargs 0]]
|
||
|
#val [list type external server [lindex $switchargs 0]]
|
||
|
|
||
|
} $ns
|
||
|
} <ns|
|
||
|
|
||
|
return $subpipe
|
||
|
}
|
||
|
|
||
|
proc pipe_nameserverlist {} {
|
||
|
return [list % {val $domain} |> {runout -n dig $data ns +short} |> linelist |> {listmap {{*}[pipe_webpub] $item} $data} <domain|]
|
||
|
}
|
||
|
|
||
|
#{*}[pipe_nameserverlist] precisium.com.au
|
||
|
|
||
|
|
||
|
proc nameserverlist {domain} {
|
||
|
tailcall {*}[pipe_nameserverlist] $domain
|
||
|
}
|
||
|
proc nameserverdisplay {domain} {
|
||
|
return [list % val $domain |> {{*}[pipe_nameserverlist] $data } |> lsort]
|
||
|
}
|
||
|
|
||
|
puts stdout "command available: nameserverlist <domain>"
|