File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -1202,6 +1202,15 @@ if [ "$fail2ban" = 'yes' ]; then
12021202 fline=$( echo " $fline " | grep enabled | tail -n1 | cut -f 1 -d -)
12031203 sed -i " ${fline} s/true/false/" /etc/fail2ban/jail.local
12041204 fi
1205+ if [ " $vsftpd " = ' yes' ]; then
1206+ # Create vsftpd Log File
1207+ if [ ! -f " /var/log/vsftpd.log" ]; then
1208+ touch /var/log/vsftpd.log
1209+ fi
1210+ fline=$( cat /etc/fail2ban/jail.local | grep -n vsftpd-iptables -A 2)
1211+ fline=$( echo " $fline " | grep enabled | tail -n1 | cut -f 1 -d -)
1212+ sed -i " ${fline} s/false/true/" /etc/fail2ban/jail.local
1213+ fi
12051214 chkconfig fail2ban on
12061215 /bin/mkdir -p /var/run/fail2ban
12071216 sed -i " s/\[Service\]/\[Service\]\nExecStartPre = \/bin\/mkdir -p \/var\/run\/fail2ban/g" /usr/lib/systemd/system/fail2ban.service
You can’t perform that action at this time.
0 commit comments