Skip to content

Commit

Permalink
Bugfix serious launch issue, preventing shutdown when dockerd not yet…
Browse files Browse the repository at this point in the history
… running (and bump to v3.2.0)
  • Loading branch information
struanb committed Aug 24, 2021
1 parent e1f0837 commit 379df73
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docker-ingress-routing-daemon
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

VERSION=3.1.0
VERSION=3.2.0

# Ingress Routing Daemon v3.1.0
# Ingress Routing Daemon v3.2.0
# Copyright © 2020-2021 Struan Bartlett
# ----------------------------------------------------------------------
# Permission is hereby granted, free of charge, to any person
Expand Down Expand Up @@ -44,9 +44,9 @@ quit() {

detect_ingress() {
read INGRESS_SUBNET INGRESS_DEFAULT_GATEWAY \
< <(docker inspect ingress --format '{{(index .IPAM.Config 0).Subnet}} {{index (split (index .Containers "ingress-sbox").IPv4Address "/") 0}}')
[ -n"$INGRESS_SUBNET" ] && [ -n"$INGRESS_DEFAULT_GATEWAY" ] && return 0
< <(docker inspect ingress --format '{{(index .IPAM.Config 0).Subnet}} {{index (split (index .Containers "ingress-sbox").IPv4Address "/") 0}}' 2>/dev/null)

[ -n "$INGRESS_SUBNET" ] && [ -n "$INGRESS_DEFAULT_GATEWAY" ] && nsenter --net=/var/run/docker/netns/ingress_sbox iptables -L >/dev/null && return 0

return 1
}
Expand Down

0 comments on commit 379df73

Please sign in to comment.