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
|
|
|
|
|
2012-04-14 21:01:37 +02:00
|
|
|
all: $(VARDIR)/$(RESTOREFILE)
|
2008-12-09 17:50:17 +01:00
|
|
|
|
2012-04-14 21:01:37 +02:00
|
|
|
$(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 \
|
2012-03-14 18:57:41 +01:00
|
|
|
/sbin/shorewall6-lite -q restart 2>&1 | tail >&2; exit 1; \
|
2008-12-09 17:50:17 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
# EOF
|