mirror of
https://github.com/chaifeng/ufw-docker.git
synced 2025-05-10 21:48:30 +02:00
if no port number
This commit is contained in:
parent
6001834bab
commit
e0b4536873
1 changed files with 1 additions and 0 deletions
|
@ -134,6 +134,7 @@ function ufw-docker--service-allow() {
|
||||||
|
|
||||||
declare port="${service_port%/*}"
|
declare port="${service_port%/*}"
|
||||||
declare proto="(tcp|udp)"
|
declare proto="(tcp|udp)"
|
||||||
|
[[ -z "$port" ]] && port="[0-9]+"
|
||||||
[[ "$service_port" = */* ]] && proto="${service_port#*/}"
|
[[ "$service_port" = */* ]] && proto="${service_port#*/}"
|
||||||
|
|
||||||
if ! docker service inspect "$service_name" \
|
if ! docker service inspect "$service_name" \
|
||||||
|
|
Loading…
Add table
Reference in a new issue