diff options
-rw-r--r-- | net/banip/Makefile | 2 | ||||
-rw-r--r-- | net/banip/files/banip-functions.sh | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/net/banip/Makefile b/net/banip/Makefile index 98004dd1e..4be2afd69 100644 --- a/net/banip/Makefile +++ b/net/banip/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=banip PKG_VERSION:=0.8.9 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_LICENSE:=GPL-3.0-or-later PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org> diff --git a/net/banip/files/banip-functions.sh b/net/banip/files/banip-functions.sh index 2d64f678a..1fa1578d6 100644 --- a/net/banip/files/banip-functions.sh +++ b/net/banip/files/banip-functions.sh @@ -952,10 +952,12 @@ f_down() { # backup feeds # f_backup() { - local backup_rc feed="${1}" feed_file="${2}" + local backup_rc="4" feed="${1}" feed_file="${2}" - gzip -cf "${feed_file}" >"${ban_backupdir}/banIP.${feed}.gz" - backup_rc="${?}" + if [ -s "${feed_file}" ]; then + gzip -cf "${feed_file}" >"${ban_backupdir}/banIP.${feed}.gz" + backup_rc="${?}" + fi f_log "debug" "f_backup ::: feed: ${feed}, file: banIP.${feed}.gz, rc: ${backup_rc}" return "${backup_rc}" |