diff options
-rw-r--r-- | security/sshguard/Makefile | 2 | ||||
-rw-r--r-- | security/sshguard/files/sshguard.in | 11 |
2 files changed, 9 insertions, 4 deletions
diff --git a/security/sshguard/Makefile b/security/sshguard/Makefile index 9dc5fde9987e..33118c65f086 100644 --- a/security/sshguard/Makefile +++ b/security/sshguard/Makefile @@ -3,7 +3,7 @@ PORTNAME= sshguard PORTVERSION= 1.5 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= security MASTER_SITES= SF/sshguard/sshguard/sshguard-${PORTVERSION} 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" |