2006-06-10 18:08:29 +02:00
|
|
|
# Shorewall Lite Makefile to restart if firewall script is newer than last restart
|
|
|
|
VARDIR=/var/lib/shorewall-lite
|
|
|
|
SHAREDIR=/usr/share/shorewall-lite
|
2006-06-05 19:13:48 +02:00
|
|
|
RESTOREFILE?=.restore
|
2006-06-17 19:59:40 +02:00
|
|
|
include $(SHAREDIR)/configpath
|
|
|
|
|
2006-06-05 19:13:48 +02:00
|
|
|
all: $(VARDIR)/${RESTOREFILE}
|
|
|
|
|
2006-06-17 19:59:40 +02:00
|
|
|
$(VARDIR)/${RESTOREFILE}: $(LITEDIR)/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 \
|
2006-06-12 19:48:20 +02:00
|
|
|
/sbin/shorewall-lite -q restart 2>&1 | tail >&2; \
|
2006-06-05 19:13:48 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
# EOF
|