remove "force add"

This commit is contained in:
Chai Feng 2018-10-06 13:06:22 +08:00
parent 4ab8060b92
commit 36afb81244
No known key found for this signature in database
GPG key ID: 2DCD9A24E523FFD2
2 changed files with 0 additions and 8 deletions

View file

@ -51,13 +51,6 @@ function ufw-docker--allow() {
mapfile -t PORT_PROTO_LIST < <(docker inspect --format='{{range $p, $conf := .NetworkSettings.Ports}}{{with $conf}}{{$p}}{{"\n"}}{{end}}{{end}}' "$INSTANCE_NAME" | remove_blank_lines)
if [[ "${UFW_DOCKER_FORCE_ADD:-}" = "yes" ]]; then
for IP in "${INSTANCE_IP_ADDRESSES[@]}"; do
ufw-docker--add-rule "$INSTANCE_NAME" "$IP" "${INSTANCE_PORT}" "${PROTO}"
done
return
fi
if [[ -z "${PORT_PROTO_LIST:-}" ]]; then
err "\"$INSTANCE_NAME\" doesn't have any published ports."
return 1