include $(TOPDIR)/rules.mk
PKG_NAME:=banip
-PKG_VERSION:=0.3.9
+PKG_VERSION:=0.3.10
PKG_RELEASE:=1
PKG_LICENSE:=GPL-3.0-or-later
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
SECTION:=net
CATEGORY:=Network
TITLE:=Ban incoming and/or outgoing ip adresses via ipsets
- DEPENDS:=+jshn +jsonfilter +ip +ipset +iptables +ca-bundle
+ DEPENDS:=+jshn +jsonfilter +ip +ipset +iptables +ca-bundle +logd
PKGARCH:=all
endef
START=30
USE_PROCD=1
-EXTRA_COMMANDS="refresh status"
-EXTRA_HELP=" refresh Refresh ipsets without new list downloads
- status Print runtime information"
+EXTRA_COMMANDS="refresh"
+EXTRA_HELP=" refresh Refresh ipsets without new list downloads"
ban_init="/etc/init.d/banip"
ban_script="/usr/bin/banip.sh"
ban_pidfile="/var/run/banip.pid"
-if [ -s "${ban_pidfile}" ] && \
- [ "${action}" != "help" ] && [ "${action}" != "status" ] && [ "${action}" != "boot" ] && [ "${action}" != "enabled" ]
+if [ -s "${ban_pidfile}" ] && { [ "${action}" = "start" ] || [ "${action}" = "stop" ] || \
+ [ "${action}" = "restart" ] || [ "${action}" = "reload" ] || [ "${action}" = "refresh" ]; }
then
- exit 1
+ exit 0
fi
boot()
#
LC_ALL=C
PATH="/usr/sbin:/usr/bin:/sbin:/bin"
-ban_ver="0.3.9"
+ban_ver="0.3.10"
ban_basever=""
ban_enabled=0
ban_automatic="1"
config_load banip
config_foreach parse_config source
+ # log daemon check
+ #
+ if [ "$(/etc/init.d/log running; printf "%u" "${?}")" -eq 1 ]
+ then
+ unset ban_logger
+ f_log "info" "your log daemon 'logd' is not running, please enable 'logd' to use this service"
+ f_rmtemp
+ exit 1
+ fi
+
# version check
#
if [ -z "${ban_basever}" ] || [ "${ban_ver%.*}" != "${ban_basever}" ]