Fixing if statement error.
This commit is contained in:
@@ -86,6 +86,7 @@ if [[ "$NSENTER" == "true" ]] ; then
|
||||
|
||||
elif [[ "$POSTROUTING" == "true" ]] ; then
|
||||
postrouting;
|
||||
fi;
|
||||
else
|
||||
ip_route="nsenter -t $(docker inspect --format {{.State.Pid}} $NAME) -n -- ip route";
|
||||
|
||||
@@ -100,11 +101,13 @@ else
|
||||
|
||||
elif [[ "$POSTROUTING" == "true" ]] ; then
|
||||
postrouting;
|
||||
fi;
|
||||
else
|
||||
|
||||
if $IPTABLES --list $CHAIN |grep ESTABLISHED |grep RELATED|grep ACCEPT ; then
|
||||
echo "nothing to do";
|
||||
else $IPTABLES -I $CHAIN -m state --state established,related -j ACCEPT;
|
||||
else
|
||||
$IPTABLES -I $CHAIN -m state --state established,related -j ACCEPT;
|
||||
fi
|
||||
|
||||
#
|
||||
|
Reference in New Issue
Block a user