2016-02-12 11:20:28 +01:00
|
|
|
#
|
|
|
|
# Shorewall6 -- /etc/shorewall6/Makefile
|
|
|
|
#
|
|
|
|
# Reload Shorewall6 if config files are updated.
|
2012-03-14 18:57:41 +01:00
|
|
|
|
2016-02-12 11:20:28 +01:00
|
|
|
SWBIN ?= /sbin/shorewall6 -q
|
|
|
|
CONFDIR ?= /etc/shorewall6
|
|
|
|
SWSTATE ?= $(shell $(SWBIN) show vardir)/firewall
|
2008-12-09 17:50:17 +01:00
|
|
|
|
2016-02-12 11:20:28 +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-09 17:50:17 +01:00
|
|
|
else \
|
2016-02-12 11:20:28 +01:00
|
|
|
echo "$${RESULT}" >&2; \
|
|
|
|
false; \
|
2008-12-09 17:50:17 +01:00
|
|
|
fi
|
|
|
|
|
2009-08-23 19:43:01 +02:00
|
|
|
clean:
|
2009-08-23 21:55:29 +02:00
|
|
|
@rm -f $(CONFDIR)/*~ $(CONFDIR)/.*~
|