1
0
shorewall_code/Shorewall/Makefile
Tuomo Soini daa016d2a3 Shorewall[6]/Makefile: remove extra restore, shorewall does that automatically
Signed-off-by: Tuomo Soini <tis@foobar.fi>
2016-02-12 18:17:46 +02:00

24 lines
463 B
Makefile

#
# Shorewall -- /etc/shorewall/Makefile
#
# Reload Shorewall if config files are updated.
SWBIN ?= /sbin/shorewall -q
CONFDIR ?= /etc/shorewall
SWSTATE ?= $(shell $(SWBIN) show vardir)/firewall
.PHONY: clean
$(SWSTATE): $(CONFDIR)/*
@$(SWBIN) save >/dev/null; \
RESULT=$$($(SWBIN) reload 2>&1); \
if [ $$? -eq 0 ]; then \
$(SWBIN) save >/dev/null; \
else \
echo "$${RESULT}" >&2; \
false; \
fi
clean:
@rm -f $(CONFDIR)/*~ $(CONFDIR)/.*~