Fixing if statement error.

This commit is contained in:
2021-12-15 10:07:59 +01:00
parent 09b2c0fe2a
commit 2d55c50588

View File

@@ -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
# #