Skip to content

Commit 19f37bb

Browse files
authored
Minor fixes to upgrade script (hestiacp#3618)
1 parent d8b2653 commit 19f37bb

File tree

3 files changed

+17
-16
lines changed

3 files changed

+17
-16
lines changed

install/deb/fail2ban/jail.local

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ action = hestia[name=WEB]
4545
logpath = /var/log/roundcube/errors.log
4646
maxretry = 5
4747

48+
[phpmyadmin-auth]
49+
enabled = true
50+
filter = phpmyadmin-syslog
51+
action = hestia[name=WEB]
52+
logpath = /var/log/auth.log
53+
maxretry = 5
54+
4855
[recidive]
4956
enabled = true
5057
filter = recidive
@@ -54,13 +61,6 @@ maxretry = 5
5461
findtime = 86400
5562
bantime = 864000
5663

57-
[phpmyadmin]
58-
enabled = true
59-
filter = phpmyadmin-syslog
60-
action = hestia[name=WEB]
61-
logpath = /var/log/auth.log
62-
maxretry = 5
63-
6464
#Uncomment and add your IPs and or domains to the Whitelist
6565
#[DEFAULT]
6666
#ignoreip = 111.111.111.111 222.222.222.222 subdomain.example.tld example.tld 333.333.333.333

install/rpm/fail2ban/jail.local

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ action = hestia[name=WEB]
4545
logpath = /var/log/roundcube/errors
4646
maxretry = 5
4747

48+
[phpmyadmin-auth]
49+
enabled = true
50+
filter = phpmyadmin-syslog
51+
action = hestia[name=WEB]
52+
logpath = /var/log/auth.log
53+
maxretry = 5
54+
4855
[recidive]
4956
enabled = true
5057
filter = recidive

install/upgrade/versions/1.8.0.sh

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ upgrade_config_set_value 'UPGRADE_UPDATE_FILEMANAGER_CONFIG' 'false'
2525

2626
if [ "$IMAP_SYSTEM" = "dovecot" ]; then
2727
if ! grep -qw "^extra_groups = mail$" /etc/dovecot/conf.d/10-master.conf 2> /dev/null; then
28-
sed -i "s/^service auth {/service auth {\n extra_groups = mail/g" /etc/dovecot/conf.d/10-master.conf
28+
sed -i "s/^service auth {/service auth {\n extra_groups = mail\n/g" /etc/dovecot/conf.d/10-master.conf
2929
fi
3030

3131
if [ -f /etc/dovecot/conf.d/90-sieve.conf ]; then
@@ -37,14 +37,8 @@ fi
3737

3838
if [ -f /etc/fail2ban/jail.local ]; then
3939
# Add phpmyadmin rule
40-
if ! -qw "^[phpmyadmin]$" /etc/fail2ban/jail.local 2> /dev/null; then
41-
echo "
42-
[phpmyadmin]
43-
enabled = true
44-
filter = phpmyadmin-syslog
45-
action = hestia[name=WEB]
46-
logpath = /var/log/auth.log
47-
maxretry = 5" >> /etc/fail2ban/jail.local
40+
if ! -qw "^[phpmyadmin-auth]$" /etc/fail2ban/jail.local 2> /dev/null; then
41+
sed -i '/\[recidive\]/i [phpmyadmin-auth]\nenabled = true\nfilter = phpmyadmin-syslog\naction = hestia[name=WEB]\nlogpath = /var/log/auth.log\nmaxretry = 5\n' /etc/fail2ban/jail.local
4842
fi
4943
fi
5044

0 commit comments

Comments
 (0)