Add a shell install script.

This commit is contained in:
markjcrane
2016-04-29 13:24:22 -06:00
parent 322c7c6d38
commit 5988b7ed7d
15 changed files with 572 additions and 0 deletions

26
debian/resources/fail2ban.sh vendored Normal file
View File

@@ -0,0 +1,26 @@
#!/bin/sh
#send a message
echo "Install Fail2ban"
#add the dependencies
apt-get install -y --force-yes fail2ban
#move the filters
cp resources/fail2ban/fusionpbx.conf /etc/fail2ban/filter.d/fusionpbx.conf
cp resources/fail2ban/freeswitch-dos.conf /etc/fail2ban/filter.d/freeswitch-dos.conf
cp resources/fail2ban/freeswitch.conf /etc/fail2ban/filter.d/freeswitch.conf
#move the template
cp resources/fail2ban/jail.package /etc/fail2ban/jail.package
cp resources/fail2ban/jail.source /etc/fail2ban/jail.source
#active the filters
cp resources/fail2ban/jail.package /etc/fail2ban/jail.local
#restart fail2ban
#systemd
/bin/systemctl restart fail2ban
#init.d
#/usr/sbin/service fail2ban restart