splitted in subscripts, cleaned

This commit is contained in:
Bachir Soussi Chiadmi
2018-04-07 11:15:09 +02:00
parent 9677df40ab
commit 0e81a4ab11
16 changed files with 695 additions and 629 deletions

18
bin/fail2ban.sh Normal file
View File

@@ -0,0 +1,18 @@
#!/bin/sh
# TODO check if root
echo '\033[35m
______ _ _____ __
/ ____/___ _(_) /__ \ / /_ ____ _____
/ /_ / __ `/ / /__/ // __ \/ __ `/ __ \
/ __/ / /_/ / / // __// /_/ / /_/ / / / /
/_/ \__,_/_/_//____/_.___/\__,_/_/ /_/
\033[0m'
echo "\033[35;1mInstalling fall2ban \033[0m"
apt-get --yes --force-yes install fail2ban
cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
# ToDo ask for email and configure jail.local with it
systemctl enable fail2ban
systemctl restart fail2ban
echo "\033[92;1mfail2ban installed and configured\033[Om"