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