diff --git a/checks/backups.sh b/checks/backups.sh index e435f4bc15ce83e8ae4f750327be426d8ca5fa85..6bcd6067b7808fe6cfa04db3033b3ab5b159526b 100644 --- a/checks/backups.sh +++ b/checks/backups.sh @@ -5,7 +5,7 @@ echo "RUN $(basename "$0") ===" DIR=$(realpath $(dirname $0)/..) if [ ! -e $DIR/main.env ] then - echo "Please copy in racine of NoCloud Auto Installer main.env.sample to main.env and edit it" + echo "Please copy in root of NoCloud Auto Installer main.env.sample to main.env and edit it" exit 1 else echo "Environment file loaded" diff --git a/install/AptCacher.sh b/install/AptCacher.sh index 92556bdc29cbf3b408b4f323d086f69d03028186..cc6c298858828dbfb965e9684cc0881247d2f1c3 100755 --- a/install/AptCacher.sh +++ b/install/AptCacher.sh @@ -5,7 +5,7 @@ echo "RUN $(basename "$0") ===" DIR=$(realpath $(dirname $0)/..) if [ ! -e $DIR/main.env ] then - echo "Please copy in racine of NoCloud Auto Installer main.env.sample to main.env and edit it" + echo "Please copy in root of NoCloud Auto Installer main.env.sample to main.env and edit it" exit 1 else echo "Environment file loaded" diff --git a/install/Base.sh b/install/Base.sh index 40dda9aea2074d7364e960d30e296736ca4458ef..2d1891ba85309a840a08c87a2a0a5c5fce8373e6 100644 --- a/install/Base.sh +++ b/install/Base.sh @@ -23,7 +23,7 @@ echo "RUN $(basename "$0") ===" DIR=$(realpath $(dirname $0)/..) if [ ! -e $DIR/main.env ] then - echo "Please copy in racine of NoCloud Auto Installer main.env.sample to main.env and edit it" + echo "Please copy in root of NoCloud Auto Installer main.env.sample to main.env and edit it" exit 1 else echo "Environment file loaded" diff --git a/install/Certbot.sh b/install/Certbot.sh index c18529ecf8f113390820038fc96cb1876c7eb783..e3c62196b4f9cb2e045b4e026c04d2007dbad290 100755 --- a/install/Certbot.sh +++ b/install/Certbot.sh @@ -21,7 +21,7 @@ echo "RUN $(basename "$0") ===" DIR=$(realpath $(dirname $0)/..) if [ ! -e $DIR/main.env ] then - echo "Please copy in racine of NoCloud Auto Installer main.env.sample to main.env and edit it" + echo "Please copy in root of NoCloud Auto Installer main.env.sample to main.env and edit it" exit 1 else echo "Environment file loaded" diff --git a/install/Collabora.sh b/install/Collabora.sh index 83a5b685b5abf68d4a6455c368b8c6663b3a6a12..292954e7730bb78c784bf14b4b0459348110d85b 100644 --- a/install/Collabora.sh +++ b/install/Collabora.sh @@ -23,7 +23,7 @@ echo "RUN $(basename "$0") ===" DIR=$(realpath $(dirname $0)/..) if [ ! -e $DIR/main.env ] then - echo "Please copy in racine of NoCloud Auto Installer main.env.sample to main.env and edit it" + echo "Please copy in root of NoCloud Auto Installer main.env.sample to main.env and edit it" exit 1 else echo "Environment file loaded" diff --git a/install/Dolibarr.sh b/install/Dolibarr.sh index c708ad469e0ac44edacf19420f73bce5120e3b87..db1c4916996d167993aa8bafbaabd862088f7792 100644 --- a/install/Dolibarr.sh +++ b/install/Dolibarr.sh @@ -23,7 +23,7 @@ echo "RUN $(basename "$0") ===" DIR=$(realpath $(dirname $0)/..) if [ ! -e $DIR/main.env ] then - echo "Please copy in racine of NoCloud Auto Installer main.env.sample to main.env and edit it" + echo "Please copy in root of NoCloud Auto Installer main.env.sample to main.env and edit it" exit 1 else echo "Environment file loaded" diff --git a/install/Monit.sh b/install/Monit.sh index f2b01f01e26c33b9aebac4763df12ecd952bd618..be46b824eef5880470af30e295156c8b5cb6a490 100644 --- a/install/Monit.sh +++ b/install/Monit.sh @@ -5,7 +5,7 @@ echo "RUN $(basename "$0") ===" DIR=$(realpath $(dirname $0)/..) if [ ! -e $DIR/main.env ] then - echo "Please copy in racine of NoCloud Auto Installer main.env.sample to main.env and edit it" + echo "Please copy in root of NoCloud Auto Installer main.env.sample to main.env and edit it" exit 1 else echo "Environment file loaded" diff --git a/install/MySQL.sh b/install/MySQL.sh index 2c47f222e3d62921e8162cfd49a7fe650459545e..aca3fc1506c5c407f8b3c689f48b46bbd0a291d4 100644 --- a/install/MySQL.sh +++ b/install/MySQL.sh @@ -23,7 +23,7 @@ echo "RUN $(basename "$0") ===" DIR=$(realpath $(dirname $0)/..) if [ ! -e $DIR/main.env ] then - echo "Please copy in racine of NoCloud Auto Installer main.env.sample to main.env and edit it" + echo "Please copy in root of NoCloud Auto Installer main.env.sample to main.env and edit it" exit 1 else echo "Environment file loaded" diff --git a/install/Nextcloud.sh b/install/Nextcloud.sh index 4472dafc7ec7d037fd5e520da7e8295b412bd138..de206759e013a3960cf820d8f90ac0001fcb0673 100644 --- a/install/Nextcloud.sh +++ b/install/Nextcloud.sh @@ -23,7 +23,7 @@ echo "RUN $(basename "$0") ===" DIR=$(realpath $(dirname $0)/..) if [ ! -e $DIR/main.env ] then - echo "Please copy in racine of NoCloud Auto Installer main.env.sample to main.env and edit it" + echo "Please copy in root of NoCloud Auto Installer main.env.sample to main.env and edit it" exit 1 else echo "Environment file loaded" diff --git a/install/OnlyOffice.sh b/install/OnlyOffice.sh index 72378aa20eeba342da2f7e608bc357e56ac6cb48..7e22ec882d0a8a8d2ba2dae61e4dad205d971859 100644 --- a/install/OnlyOffice.sh +++ b/install/OnlyOffice.sh @@ -5,7 +5,7 @@ echo "RUN $(basename "$0") ===" DIR=$(realpath $(dirname $0)/..) if [ ! -e $DIR/main.env ] then - echo "Please copy in racine of NoCloud Auto Installer main.env.sample to main.env and edit it" + echo "Please copy in root of NoCloud Auto Installer main.env.sample to main.env and edit it" exit 1 else echo "Environment file loaded" diff --git a/install/TetrasBack.sh b/install/TetrasBack.sh index 50bb267ed756d95b1e36dd13c42186be1f9a0a25..378ce48aa691326d252de424308fe191b0ab5650 100644 --- a/install/TetrasBack.sh +++ b/install/TetrasBack.sh @@ -25,7 +25,7 @@ set -o nounset # Treat unset variables as an error if [ ! -e $(pwd)/$(dirname "$0")/../main.env ] then - echo "Please copy in racine of NoCloud Auto Installer main.env.sample to main.env and edit it" + echo "Please copy in root of NoCloud Auto Installer main.env.sample to main.env and edit it" exit 1 fi . $(pwd)/$(dirname "$0")/../main.env diff --git a/install/Traefik.sh b/install/Traefik.sh index 11fb6c78e5502597450090fd45e735b54c455b26..fda6f172d2865593db826dd241a446c331f54312 100644 --- a/install/Traefik.sh +++ b/install/Traefik.sh @@ -5,7 +5,7 @@ echo "RUN $(basename "$0") ===" DIR=$(realpath $(dirname $0)/..) if [ ! -e $DIR/main.env ] then - echo "Please copy in racine of NoCloud Auto Installer main.env.sample to main.env and edit it" + echo "Please copy in root of NoCloud Auto Installer main.env.sample to main.env and edit it" exit 1 else echo "Environment file loaded" diff --git a/install/WebServer.sh b/install/WebServer.sh index 958a7f5deb3c44f6fb8306261c5fd2ff90afc673..300d89f89ca69e5cc783e0cb26501ea487f673bb 100644 --- a/install/WebServer.sh +++ b/install/WebServer.sh @@ -23,7 +23,7 @@ echo "RUN $(basename "$0") ===" DIR=$(realpath $(dirname $0)/..) if [ ! -e $DIR/main.env ] then - echo "Please copy in racine of NoCloud Auto Installer main.env.sample to main.env and edit it" + echo "Please copy in root of NoCloud Auto Installer main.env.sample to main.env and edit it" exit 1 else echo "Environment file loaded" diff --git a/main.env.sample b/main.env.sample index 0c093ac3b01514eda15ace2ffc1d06b44baec755..2b12124b3c7c00b0f5199de6e9a719ba1ded838e 100644 --- a/main.env.sample +++ b/main.env.sample @@ -36,6 +36,10 @@ export NEXTCLOUD_DATABASE_NAME="nextcloud" # Week for logrotate, by default 4 week export LOGROTATE=4 +# Fail2ban variables +# maxretry for traefik jail for fail2ban +export FAIL2BAN_TRAEFIK_MAXRETRY=15 # 15 by default + # Monit variables # CPU and RAM overload time is in monit cycle. 1 cycle = 2 minutes export CPU_OVERLOAD_TIME=30 # 1h by default diff --git a/upgrade/All.sh b/upgrade/All.sh index 137c39f8b5fd7957b33380d2f091830143eeb4f6..e1c295445b816ef6a64daf09cdd313376cae4280 100644 --- a/upgrade/All.sh +++ b/upgrade/All.sh @@ -22,7 +22,7 @@ echo "RUN $(basename "$0") ===" DIR=$(realpath $(dirname $0)/..) if [ ! -e $DIR/main.env ] then - echo "Please copy in racine of NoCloud Auto Installer main.env.sample to main.env and edit it" + echo "Please copy in root of NoCloud Auto Installer main.env.sample to main.env and edit it" exit 1 else echo "Environment file loaded" diff --git a/upgrade/Backups.sh b/upgrade/Backups.sh index de60613daf3cba36034149c7f0ace37b6a9fa66f..58d9184c7242337d3d945f0a8645d719d907825e 100644 --- a/upgrade/Backups.sh +++ b/upgrade/Backups.sh @@ -5,7 +5,7 @@ echo "RUN $(basename "$0") ===" DIR=$(realpath $(dirname $0)/..) if [ ! -e $DIR/main.env ] then - echo "Please copy in racine of NoCloud Auto Installer main.env.sample to main.env and edit it" + echo "Please copy in root of NoCloud Auto Installer main.env.sample to main.env and edit it" exit 1 else echo "Environment file loaded" diff --git a/upgrade/Collabora.sh b/upgrade/Collabora.sh index f2eed9324b62e42e0fcc3ea31d40c0477ae805de..65f87b0d86706cbfc08eb553af28cf77edd85217 100644 --- a/upgrade/Collabora.sh +++ b/upgrade/Collabora.sh @@ -5,7 +5,7 @@ echo "RUN $(basename "$0") ===" DIR=$(realpath $(dirname $0)/..) if [ ! -e $DIR/main.env ] then - echo "Please copy in racine of NoCloud Auto Installer main.env.sample to main.env and edit it" + echo "Please copy in root of NoCloud Auto Installer main.env.sample to main.env and edit it" exit 1 else echo "Environment file loaded" diff --git a/upgrade/Dolibarr.sh b/upgrade/Dolibarr.sh index 25d1b1ca12b350be2f02c4a74d52a40954108d2f..eec51d5a382dafa28c36045b845bf695155702c3 100644 --- a/upgrade/Dolibarr.sh +++ b/upgrade/Dolibarr.sh @@ -21,7 +21,7 @@ echo "RUN $(basename "$0") ===" DIR=$(realpath $(dirname $0)/..) if [ ! -e $DIR/main.env ] then - echo "Please copy in racine of NoCloud Auto Installer main.env.sample to main.env and edit it" + echo "Please copy in root of NoCloud Auto Installer main.env.sample to main.env and edit it" exit 1 else echo "Environment file loaded" diff --git a/upgrade/Monit.sh b/upgrade/Monit.sh index ada60aaeb57857958fe12b5652d60ca069494f9a..cc3682333280cdee93071068be8ffb31b8edbe1e 100644 --- a/upgrade/Monit.sh +++ b/upgrade/Monit.sh @@ -5,7 +5,7 @@ echo "RUN $(basename "$0") ===" DIR=$(realpath $(dirname $0)/..) if [ ! -e $DIR/main.env ] then - echo "Please copy in racine of NoCloud Auto Installer main.env.sample to main.env and edit it" + echo "Please copy in root of NoCloud Auto Installer main.env.sample to main.env and edit it" exit 1 else echo "Environment file loaded" diff --git a/upgrade/Traefik.sh b/upgrade/Traefik.sh index 21fc6dabbab8327875302e2f6f33e3ba598713e4..f0b8c658f8915f21abe2a54a6290fb2c20d2d0c9 100644 --- a/upgrade/Traefik.sh +++ b/upgrade/Traefik.sh @@ -5,7 +5,7 @@ echo "RUN $(basename "$0") ===" DIR=$(realpath $(dirname $0)/..) if [ ! -e $DIR/main.env ] then - echo "Please copy in racine of NoCloud Auto Installer main.env.sample to main.env and edit it" + echo "Please copy in root of NoCloud Auto Installer main.env.sample to main.env and edit it" exit 1 else echo "Environment file loaded" diff --git a/upgrade/WebServer.sh b/upgrade/WebServer.sh index 8b47d787ce1e0dd84e5223ce2a4ec5c8ea65e33a..97dc049e12c26933d6cf917d4671a15e034e8806 100644 --- a/upgrade/WebServer.sh +++ b/upgrade/WebServer.sh @@ -5,7 +5,7 @@ echo "RUN $(basename "$0") ===" DIR=$(realpath $(dirname $0)/..) if [ ! -e $DIR/main.env ] then - echo "Please copy in racine of NoCloud Auto Installer main.env.sample to main.env and edit it" + echo "Please copy in root of NoCloud Auto Installer main.env.sample to main.env and edit it" exit 1 else echo "Environment file loaded" diff --git a/upgrade/traefik_fail2ban.sh b/upgrade/traefik_fail2ban.sh index 79206d221f0284897e75cc17cbfa7140e88df295..5dedfe6f1faf7a0ec2f441f06ec7ff7f0a4b0592 100644 --- a/upgrade/traefik_fail2ban.sh +++ b/upgrade/traefik_fail2ban.sh @@ -1,10 +1,21 @@ #!/bin/bash +DIR=$(realpath $(dirname $0)/..) +if [ ! -e $DIR/main.env ] +then + echo "Please copy in root of NoCloud Auto Installer main.env.sample to main.env and edit it" + exit 1 +else + echo "Environment file loaded" +fi +. $DIR/main.env + cat <<EOF > /etc/fail2ban/jail.d/nocloud_traefik.conf [traefik-auth] enabled = true logpath = /home/dockerweb/traefik/log/access.log chain = DOCKER-USER +maxretry = ${FAIL2BAN_TRAEFIK_MAXRETRY:-15} mode = aggressive findtime = 4h banaction = docker-page diff --git a/utils/attestDolibarr.sh b/utils/attestDolibarr.sh index 2f750627e73ca6cc54e4431827e13362a5266f28..d10fc800254027e8a376791fd6cba5de226c2e01 100755 --- a/utils/attestDolibarr.sh +++ b/utils/attestDolibarr.sh @@ -4,7 +4,7 @@ echo "RUN $(basename "$0") ===" if [ ! -e $(dirname "$0")/../main.env ] then - echo "Please copy in racine of NoCloud Auto Installer main.env.sample to main.env and edit it" + echo "Please copy in root of NoCloud Auto Installer main.env.sample to main.env and edit it" exit 1 else echo "Environment file loaded" diff --git a/utils/getIgnoreIp.sh b/utils/getIgnoreIp.sh index 1cff80a5e82047ff6447dd5e8545a0ea4fc92287..32522b8ae443a2475d69c4a01d32e809f1357abf 100644 --- a/utils/getIgnoreIp.sh +++ b/utils/getIgnoreIp.sh @@ -7,7 +7,7 @@ echo "RUN $(basename "$0") ===" DIR=$(realpath $(dirname $0)/..) if [ ! -e $DIR/main.env ] then - echo "Please copy in racine of NoCloud Auto Installer main.env.sample to main.env and edit it" + echo "Please copy in root of NoCloud Auto Installer main.env.sample to main.env and edit it" exit 1 else echo "Environment file loaded" diff --git a/utils/startcollabora.sh b/utils/startcollabora.sh index 54654f406b6e1372e66f2a2614f9df3c8992d595..bf7211ec5a7fa80afe6b8762f3e582475e2048e4 100755 --- a/utils/startcollabora.sh +++ b/utils/startcollabora.sh @@ -4,7 +4,7 @@ echo "RUN $(basename "$0") ===" if [ ! -e $(dirname "$0")/../main.env ] then - echo "Please copy in racine of NoCloud Auto Installer main.env.sample to main.env and edit it" + echo "Please copy in root of NoCloud Auto Installer main.env.sample to main.env and edit it" exit 1 else echo "Environment file loaded"