void-packages/srcpkgs/sshguard/files/sshguard-socklog/run

16 lines
487 B
Bash
Executable File

#!/bin/sh
exec 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