Compare commits

...

3 Commits

Author SHA1 Message Date
Asif Bacchus d296518193 dummy -- rename file 2019-05-20 16:52:12 -06:00
Asif Bacchus b013d92cb8 beginning of config script 2019-05-20 16:51:49 -06:00
Asif Bacchus e96ca3317b fix gitignore 2019-05-20 16:49:54 -06:00
2 changed files with 45 additions and 1 deletions

2
.gitignore vendored
View File

@ -1,2 +1,2 @@
### Ignore .vscode settings
.vscode/
.vscode/*

44
f2b-config.sh Normal file
View File

@ -0,0 +1,44 @@
#!/bin/bash
#######
### Copy customized jails, filters and action configuration files to fail2ban
### directory and activate them
#######
### set script output colours
normal="\e[0m"
bold="\e[1m"
default="\e[39m"
err="\e[1;31m"
warn="\e[1;93m"
ok="\e[32m"
lit="\e[93m"
op="\e[39m"
info="\e[96m"
note="\e[95m"
### functions
### end of functions
### pre-requisites
# exit script if fail2ban is not installed
if ! [ -x "$(command -v fail2ban-client)" ]; then
echo
echo -e "${err}Cannot find fail2ban, is it installed? Exiting script." \
"${normal}"
echo
exit 1
fi
# check if running as root
if [ "$(id -u)" -ne 0 ]; then
echo
echo -e "${err}This script MUST be run as ROOT. Exiting.${normal}"
echo
exit 2
fi