From 4e0685bf213f39b9eb8d88e64d8aeeaa3f9f056d Mon Sep 17 00:00:00 2001 From: TommyTran732 <57488583+tommytran732@users.noreply.github.com> Date: Fri, 11 Sep 2020 06:04:03 -0400 Subject: [PATCH] Improvement to the MariaDB setup Made the code a bit more consistent --- install.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 1cf5c05..d976271 100644 --- a/install.sh +++ b/install.sh @@ -532,22 +532,23 @@ install_pterodactyl() { output "Binding MariaDB/MySQL to 0.0.0.0." if [ -f /etc/mysql/mariadb.conf.d/50-server.cnf && grep -Fq "bind-address" /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 -- '/bind-address/s/127.0.0.1/0.0.0.0/g' /etc/mysql/mariadb.conf.d/50-server.cnf output 'Restarting MySQL process...' service mysql restart elif [ -f /etc/mysql/my.cnf && grep -Fq "bind-address" /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 + sed -i -- '/bind-address/s/127.0.0.1/0.0.0.0/g' /etc/mysql/my.cnf output 'Restarting MySQL process...' service mysql restart elif [ -f /etc/my.cnf && grep -Fq "bind-address" /etc/my.cnf ] ; then sed -i -- 's/bind-address/# bind-address/g' /etc/my.cnf - sed -i '/\[mysqld\]/a bind-address = 0.0.0.0' /etc/my.cnf + sed -i -- '/bind-address/s/127.0.0.1/0.0.0.0/g' /etc/my.cnf output 'Restarting MySQL process...' service mysql restart elif [ -f /etc/mysql/my.conf.d/mysqld.cnf && grep -Fq "bind-address" /etc/mysql/my.conf.d/mysqld.cnf ] ; then sed -i -- 's/bind-address/# bind-address/g' /etc/mysql/my.conf.d/mysqld.cnf - sed -i '/\[mysqld\]/a bind-address = 0.0.0.0' /etc/mysql/my.conf.d/mysqld.cnf + sed -i -- '/bind-address/s/127.0.0.1/0.0.0.0/g' /etc/mysql/my.conf.d/mysqld.cnf output 'Restarting MySQL process...' service mysql restart else