extract optional protocol from short form

fixes issue #1
master
lub 5 years ago
parent 8712db3763
commit 26eb77afd4

@ -132,11 +132,13 @@ foreach($yaml in (Get-ChildItem -Path $Stacks -Include '*.yml','*.yaml' -Recurse
$nat.published_port = $published_splitted[1]
} else {
#short form
$ports_splitted = $port -split ':'
$all_splitted = $port -split ':'
$port_splitted = $all_splitted[2] -split '/'
$nat.ip = $ports_splitted[0]
$nat.port = $ports_splitted[2]
$nat.published_port = $ports_splitted[1]
$nat.protocol = $port_splitted[1]
$nat.ip = $all_splitted[0]
$nat.port = $port_splitted[0]
$nat.published_port = $all_splitted[1]
}
if(!$nat.protocol) {

Loading…
Cancel
Save