Improve IS_EVOMAINTENANCE_FW : lower rules number to 2

Closes #42
This commit is contained in:
Gregory Colpart 2018-07-27 01:53:27 +02:00
parent cd38bbaab4
commit 38beacc87b

View file

@ -360,7 +360,7 @@ if [ -e /etc/debian_version ]; then
if [ "$IS_EVOMAINTENANCE_FW" = 1 ]; then
if [ -f "$MINIFW_FILE" ]; then
rulesNumber=$(grep -c "/sbin/iptables -A INPUT -p tcp --sport 5432 --dport 1024:65535 -s .* -m state --state ESTABLISHED,RELATED -j ACCEPT" "$MINIFW_FILE")
if [ "$rulesNumber" -lt 4 ]; then
if [ "$rulesNumber" -lt 2 ]; then
echo 'IS_EVOMAINTENANCE_FW FAILED!'
fi
fi