2016-02-12 11:19:25 +01:00
|
|
|
#
|
|
|
|
# Shorewall -- /etc/shorewall/Makefile
|
|
|
|
#
|
|
|
|
# Reload Shorewall if config files are updated.
|
2012-03-14 18:57:41 +01:00
|
|
|
|
2016-02-12 11:19:25 +01:00
|
|
|
SWBIN ?= /sbin/shorewall -q
|
|
|
|
CONFDIR ?= /etc/shorewall
|
|
|
|
SWSTATE ?= $(shell $(SWBIN) show vardir)/firewall
|
2008-12-07 19:17:26 +01:00
|
|
|
|
2016-02-12 11:19:25 +01:00
|
|
|
.PHONY: clean
|
|
|
|
|
|
|
|
$(SWSTATE): $(CONFDIR)/*
|
|
|
|
@$(SWBIN) save >/dev/null; \
|
|
|
|
RESULT=$$($(SWBIN) reload 2>&1); \
|
|
|
|
if [ $$? -eq 0 ]; then \
|
|
|
|
$(SWBIN) save >/dev/null; \
|
2008-12-07 19:17:26 +01:00
|
|
|
else \
|
2016-02-12 11:19:25 +01:00
|
|
|
echo "$${RESULT}" >&2; \
|
|
|
|
false; \
|
2008-12-07 19:17:26 +01:00
|
|
|
fi
|
|
|
|
|
2009-08-23 19:43:01 +02:00
|
|
|
clean:
|
2009-08-23 21:55:29 +02:00
|
|
|
@rm -f $(CONFDIR)/*~ $(CONFDIR)/.*~
|