sshguard: support dynamic firewall config and remove iptables dependency

This commit is contained in:
Andrew J. Hesford 2020-01-22 16:35:49 -05:00 committed by Duncan Overbruck
parent 506a304462
commit ae060529d4
2 changed files with 13 additions and 5 deletions

View file

@ -1,5 +1,14 @@
#!/bin/sh
sv check iptables >/dev/null || exit 1
sv check socklog-unix >/dev/null || exit 1
exec sshguard -l /var/log/socklog/secure/current -b 200:/var/db/sshguard/blacklist.db 2>&1
# Defaults that mabe be overridden (or erased entirely) by configuration
LOGFILE="${LOGFILE:-/var/log/socklog/secure/current}"
BLACKLIST_SPEC="${BLACKLIST_SPEC:-200:/var/db/sshguard/blacklist.db}"
# Allow the firewall and logger backends to be specified
[ -f ./conf ] && . ./conf
# If specified, add blacklist spec and log source to OPTS
[ -n "$BLACKLIST_SPEC" ] && OPTS="-b $BLACKLIST_SPEC"
[ -n "$LOGFILE" ] && OPTS="-l $LOGFILE $OPTS"
exec sshguard $OPTS 2>&1

View file

@ -1,10 +1,9 @@
# Template file for 'sshguard'
pkgname=sshguard
version=2.4.0
revision=1
revision=2
build_style=gnu-configure
hostmakedepends="flex"
depends="iptables"
short_desc="Protects networked hosts from brute force attacks"
maintainer="Lodvær <lodvaer@gmail.com>"
license="BSD-3-Clause"