Ignore 'start' and 'stop' if firewall product is active

Signed-off-by: Tuomo Soini <tis@foobar.fi>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tuomo Soini 2020-04-16 20:59:29 +03:00 committed by Tom Eastep
parent caa0290cb2
commit 6841fc9eb2

View File

@ -93,8 +93,15 @@ shorewall_stop () {
printf "Clearing \"Shorewall-based firewalls\": "
for PRODUCT in $PRODUCTS; do
if setstatedir; then
#
# Run in sub-shell to avoid name collisions
#
(
if ! ${STATEDIR}/firewall status > /dev/null 2>&1; then
${STATEDIR}/firewall ${OPTIONS} clear
fi
)
fi
done
if [ -n "$SAVE_IPSETS" ]; then