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,7 +93,14 @@ shorewall_stop () {
printf "Clearing \"Shorewall-based firewalls\": "
for PRODUCT in $PRODUCTS; do
if setstatedir; then
${STATEDIR}/firewall ${OPTIONS} clear
#
# Run in sub-shell to avoid name collisions
#
(
if ! ${STATEDIR}/firewall status > /dev/null 2>&1; then
${STATEDIR}/firewall ${OPTIONS} clear
fi
)
fi
done