Просмотр исходного кода

Fix issue when enabling mysqld-iptables in Fail2Ban (#3025)

* Fix issue when enabling mysqld-iptables

* Added script to update current installations

* Add default settings

Co-authored-by: Jaap Marcus <9754650+jaapmarcus@users.noreply.github.com>
Neto 3 лет назад
Родитель
Сommit
a84d8ce918

+ 1 - 1
install/deb/fail2ban/jail.local

@@ -28,7 +28,7 @@ logpath  = /var/log/dovecot.log
 enabled  = false
 filter   = mysqld-auth
 action   = hestia[name=DB]
-logpath  = /var/log/mysql.log
+logpath  = /var/log/mysql/error.log
 maxretry = 5
 
 [hestia-iptables]

+ 1 - 1
install/rpm/fail2ban/jail.local

@@ -28,7 +28,7 @@ logpath  = /var/log/dovecot.log
 enabled  = false
 filter   = mysqld-auth
 action   = hestia[name=DB]
-logpath  = /var/log/mysql.log
+logpath  = /var/log/mysql/error.log
 maxretry = 5
 
 [hestia-iptables]

+ 26 - 0
install/upgrade/versions/1.6.12.sh

@@ -0,0 +1,26 @@
+#!/bin/bash
+
+# Hestia Control Panel upgrade script for target version 1.6.12
+
+#######################################################################################
+#######                      Place additional commands below.                   #######
+#######################################################################################
+####### Pass through information to the end user in case of a issue or problem  #######
+#######                                                                         #######
+####### Use add_upgrade_message "My message here" to include a message          #######
+####### in the upgrade notification email. Example:                             #######
+#######                                                                         #######
+####### add_upgrade_message "My message here"                                   #######
+#######                                                                         #######
+####### You can use \n within the string to create new lines.                   #######
+#######################################################################################
+
+upgrade_config_set_value 'UPGRADE_UPDATE_WEB_TEMPLATES' 'no'
+upgrade_config_set_value 'UPGRADE_UPDATE_DNS_TEMPLATES' 'no'
+upgrade_config_set_value 'UPGRADE_UPDATE_MAIL_TEMPLATES' 'no'
+upgrade_config_set_value 'UPGRADE_REBUILD_USERS' 'no'
+upgrade_config_set_value 'UPGRADE_UPDATE_FILEMANAGER_CONFIG' 'false'
+
+if [ -f "/etc/fail2ban/jail.local" ]; then
+    sed -i "s|/var/log/mysql.log|/var/log/mysql/error.log|g" /etc/fail2ban/jail.local
+fi