2009-02-21 18:21:51 +01:00
|
|
|
# Shorewall6 Lite Makefile to restart if firewall script is newer than last restart
|
|
|
|
VARDIR=$(shell /sbin/shorewall6-lite show vardir)
|
|
|
|
SHAREDIR=/usr/share/shorewall6-lite
|
2008-12-09 17:50:17 +01:00
|
|
|
RESTOREFILE?=.restore
|
|
|
|
|
|
|
|
all: $(VARDIR)/${RESTOREFILE}
|
|
|
|
|
|
|
|
$(VARDIR)/${RESTOREFILE}: $(VARDIR)/firewall
|
2009-02-21 18:21:51 +01:00
|
|
|
@/sbin/shorewall6-lite -q save >/dev/null; \
|
2008-12-09 17:50:17 +01:00
|
|
|
if \
|
2009-02-21 18:21:51 +01:00
|
|
|
/sbin/shorewall6-lite -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-lite -q save >/dev/null; \
|
2008-12-09 17:50:17 +01:00
|
|
|
else \
|
2009-02-21 18:21:51 +01:00
|
|
|
/sbin/shorewall6-lite -q restart 2>&1 | tail >&2; \
|
2008-12-09 17:50:17 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
# EOF
|