diff options
author | Dirk Brenken <dev@brenken.org> | 2023-07-07 20:03:08 +0200 |
---|---|---|
committer | Dirk Brenken <dev@brenken.org> | 2023-07-07 20:03:08 +0200 |
commit | 137045faa904fd826be9e82b22aa2ee1d65229b7 (patch) | |
tree | 03ccd87ee5433d7f48ecf9d1d5dba3df964487fe /net/banip/files/banip-functions.sh | |
parent | 68cdc3952dd7adf6fb1ed4b8138ec5478ac18b9a (diff) |
banip: update 0.8.9-2
* fix a corner case backup issue with empty feed downloads
Signed-off-by: Dirk Brenken <dev@brenken.org>
Diffstat (limited to 'net/banip/files/banip-functions.sh')
-rw-r--r-- | net/banip/files/banip-functions.sh | 8 |
1 files changed, 5 insertions, 3 deletions
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}" |