summaryrefslogtreecommitdiff
path: root/security/sshguard/files/sshguard.in
diff options
context:
space:
mode:
authorMark Felder <feld@FreeBSD.org>2014-11-03 21:56:18 +0000
committerMark Felder <feld@FreeBSD.org>2014-11-03 21:56:18 +0000
commit6d3d501d8cf4ce1aaef6db329fe603d91a1c77d5 (patch)
treead2cfd97d88819200fc7f5e14a187582cf66c483 /security/sshguard/files/sshguard.in
parentFix build failure for original (non-Diamond) version by removing file (diff)
Make it possible to run sshguard without blacklist database by setting
in rc.conf: sshguard_blacklist="" This may fix reliability for some users. PR: 174018
Notes
Notes: svn path=/head/; revision=372126
Diffstat (limited to 'security/sshguard/files/sshguard.in')
-rw-r--r--security/sshguard/files/sshguard.in11
1 files changed, 8 insertions, 3 deletions
diff --git a/security/sshguard/files/sshguard.in b/security/sshguard/files/sshguard.in
index 05bf9bc73065..2fd499ab0256 100644
--- a/security/sshguard/files/sshguard.in
+++ b/security/sshguard/files/sshguard.in
@@ -80,13 +80,18 @@ command=/usr/sbin/daemon
actual_command="%%PREFIX%%/sbin/sshguard"
procname="${actual_command}"
start_precmd=sshguard_prestart
-command_args="-c ${actual_command} -b ${sshguard_blacklist} \${sshguard_watch_params} -a ${sshguard_safety_thresh} -p ${sshguard_pardon_min_interval} -s ${sshguard_prescribe_interval} -w ${sshguard_whitelistfile} -i ${pidfile}"
+command_args="-c ${actual_command} \${sshguard_blacklist_params} \${sshguard_watch_params} -a ${sshguard_safety_thresh} -p ${sshguard_pardon_min_interval} -s ${sshguard_prescribe_interval} -w ${sshguard_whitelistfile} -i ${pidfile}"
sshguard_prestart()
{
- mkdir -p `dirname ${sshguard_blacklist##*:}`
+ if [ ! -z ${sshguard_blacklist} ]; then
+ mkdir -p $(dirname ${sshguard_blacklist##*:})
+ sshguard_blacklist_params="-b ${sshguard_blacklist}"
+ fi
+
[ -e ${sshguard_whitelistfile} ] || touch ${sshguard_whitelistfile}
- sshguard_watch_params=`echo ${sshguard_watch_logs} | tr : \\\n | sed -e s/^/-l\ /g | tr \\\n \ `
+
+ sshguard_watch_params=$(echo ${sshguard_watch_logs} | tr : \\\n | sed -e s/^/-l\ /g | tr \\\n \ )
}
run_rc_command "$1"