Update fail2ban.sh
This commit is contained in:
parent
083d180e8e
commit
79eb85668a
|
|
@ -13,9 +13,6 @@ verbose "Installing Fail2ban"
|
|||
#add the dependencies
|
||||
pkg install --yes py27-fail2ban
|
||||
|
||||
#update the list of executables in the path
|
||||
rehash
|
||||
|
||||
#enable fail2ban service
|
||||
echo 'fail2ban_enable="YES"' >> /etc/rc.conf
|
||||
|
||||
|
|
@ -29,10 +26,5 @@ cp fail2ban/nginx-404.conf /usr/local/etc/fail2ban/filter.d/nginx-404.conf
|
|||
cp fail2ban/nginx-dos.conf /usr/local/etc/fail2ban/filter.d/nginx-dos.conf
|
||||
cp fail2ban/jail.local /usr/local/etc/fail2ban/jail.local
|
||||
|
||||
#update config if source is being used
|
||||
if [ .$switch_source = .true ]; then
|
||||
sed -i' ' -e 's#var/log/freeswitch#usr/local/freeswitch/log#g' /usr/local/etc/fail2ban/jail.local
|
||||
fi
|
||||
|
||||
#restart fail2ban
|
||||
service fail2ban restart
|
||||
|
|
|
|||
Loading…
Reference in New Issue