2006-06-10 18:08:29 +02:00
|
|
|
# Shorewall Lite Makefile to restart if firewall script is newer than last restart
|
2007-11-16 00:24:54 +01:00
|
|
|
VARDIR=$(shell /sbin/shorewall-lite show vardir)
|
2006-06-10 18:08:29 +02:00
|
|
|
SHAREDIR=/usr/share/shorewall-lite
|
2006-06-05 19:13:48 +02:00
|
|
|
RESTOREFILE?=.restore
|
2006-06-17 19:59:40 +02:00
|
|
|
|
2006-06-05 19:13:48 +02:00
|
|
|
all: $(VARDIR)/${RESTOREFILE}
|
|
|
|
|
2007-11-16 00:24:54 +01:00
|
|
|
$(VARDIR)/${RESTOREFILE}: $(VARDIR)/firewall
|
2006-06-12 19:48:20 +02:00
|
|
|
@/sbin/shorewall-lite -q save >/dev/null; \
|
2006-06-05 19:13:48 +02:00
|
|
|
if \
|
2006-06-12 19:48:20 +02:00
|
|
|
/sbin/shorewall-lite -q restart >/dev/null 2>&1; \
|
2006-06-05 19:13:48 +02:00
|
|
|
then \
|
2006-06-12 19:48:20 +02:00
|
|
|
/sbin/shorewall-lite -q save >/dev/null; \
|
2006-06-05 19:13:48 +02:00
|
|
|
else \
|
2012-03-14 18:57:41 +01:00
|
|
|
/sbin/shorewall-lite -q restart 2>&1 | tail >&2; exit 1; \
|
2006-06-05 19:13:48 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
# EOF
|