2008-12-13 20:30:23 +01:00
|
|
|
# Shorewall6 Makefile to restart if config-files are newer than last restart
|
|
|
|
VARDIR=$(shell /sbin/shorewall6 show vardir)
|
|
|
|
CONFDIR=/etc/shorewall6
|
2009-03-01 20:46:30 +01:00
|
|
|
RESTOREFILE?=firewall
|
2008-12-09 17:50:17 +01:00
|
|
|
all: $(VARDIR)/${RESTOREFILE}
|
|
|
|
|
|
|
|
$(VARDIR)/${RESTOREFILE}: $(CONFDIR)/*
|
2009-02-21 18:21:51 +01:00
|
|
|
@/sbin/shorewall6 -q save >/dev/null; \
|
2008-12-09 17:50:17 +01:00
|
|
|
if \
|
2009-02-21 18:21:51 +01:00
|
|
|
/sbin/shorewall6 -q restart >/dev/null 2>&1; \
|
2008-12-09 17:50:17 +01:00
|
|
|
then \
|
2009-02-21 18:21:51 +01:00
|
|
|
/sbin/shorewall6 -q save >/dev/null; \
|
2008-12-09 17:50:17 +01:00
|
|
|
else \
|
2009-02-21 18:21:51 +01:00
|
|
|
/sbin/shorewall6 -q restart 2>&1 | tail >&2; \
|
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)/.*~
|
2009-08-23 19:43:01 +02:00
|
|
|
.PHONY: clean
|
|
|
|
|
2008-12-09 17:50:17 +01:00
|
|
|
# EOF
|