Skip to content

Commit 7093f5a

Browse files
authored
Fix issue with duplicated phpmyadmin-auth blocks in jail.local (hestiacp#3642)
* Fix: Update check if jail exists fails Causing fail2ban to stop working * Fix restore document errors files Causing error during rebuild
1 parent 517e4c8 commit 7093f5a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

func/rebuild.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ rebuild_web_domain_conf() {
261261
if [ ! -d "$HOMEDIR/$user/web/$domain/document_errors" ]; then
262262
$BIN/v-add-fs-directory "$user" "$HOMEDIR/$user/web/$domain/document_errors"
263263
# Propagating html skeleton
264-
user_exec cp -r "$WEBTPL/skel/document_errors/*" "$HOMEDIR/$user/web/$domain/document_errors/"
264+
user_exec cp -r "$WEBTPL/skel/document_errors/" "$HOMEDIR/$user/web/$domain/"
265265
fi
266266
$BIN/v-add-fs-directory "$user" "$HOMEDIR/$user/web/$domain/cgi-bin"
267267
$BIN/v-add-fs-directory "$user" "$HOMEDIR/$user/web/$domain/private"

install/upgrade/versions/1.8.0.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ fi
3737

3838
if [ -f /etc/fail2ban/jail.local ]; then
3939
# Add phpmyadmin rule
40-
if ! grep -qw "^[phpmyadmin-auth]$" /etc/fail2ban/jail.local 2> /dev/null; then
40+
if ! grep -qw "^phpmyadmin-auth$" /etc/fail2ban/jail.local 2> /dev/null; then
4141
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
4242
fi
4343
fi

0 commit comments

Comments
 (0)