diff --git a/install.sh b/install.sh index 53f7523..a29b48b 100644 --- a/install.sh +++ b/install.sh @@ -531,7 +531,12 @@ install_pterodactyl() { mysql -u root -e "$SQL" output "Binding MariaDB/MySQL to 0.0.0.0." - if [ -f /etc/mysql/my.cnf ] ; then + if [ -f /etc/mysql/mariadb.conf.d/50-server.cnf ] ; then + sed -i -- 's/bind-address/# bind-address/g' /etc/mysql/mariadb.conf.d/50-server.cnf + sed -i '/\[mysqld\]/a bind-address = 0.0.0.0' /etc/mysql/mariadb.conf.d/50-server.cnf + output 'Restarting MySQL process...' + service mysql restart + elif [ -f /etc/mysql/my.cnf ] ; then sed -i -- 's/bind-address/# bind-address/g' /etc/mysql/my.cnf sed -i '/\[mysqld\]/a bind-address = 0.0.0.0' /etc/mysql/my.cnf output 'Restarting MySQL process...' @@ -546,11 +551,6 @@ install_pterodactyl() { sed -i '/\[mysqld\]/a bind-address = 0.0.0.0' /etc/mysql/my.conf.d/mysqld.cnf output 'Restarting MySQL process...' service mysql restart - elif [ -f /etc/mysql/mariadb.conf.d/50-server.cnf ] ; then - sed -i -- 's/bind-address/# bind-address/g' /etc/mysql/mariadb.conf.d/50-server.cnf - sed -i '/\[mysqld\]/a bind-address = 0.0.0.0' /etc/mysql/mariadb.conf.d/50-server.cnf - output 'Restarting MySQL process...' - service mysql restart else output 'File my.cnf was not found! Please contact support.' fi