mirror of
https://github.com/tommytran732/Pterodactyl-Script
synced 2024-11-22 18:41:32 -05:00
Merge pull request #10 from SagnikSRHUSE/patch-1
Improve MySQL config changes
This commit is contained in:
commit
ef592fa470
16
install.sh
16
install.sh
@ -531,23 +531,23 @@ install_pterodactyl() {
|
|||||||
mysql -u root -e "$SQL"
|
mysql -u root -e "$SQL"
|
||||||
|
|
||||||
output "Binding MariaDB/MySQL to 0.0.0.0."
|
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
|
if grep -Fqs "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/#//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
|
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...'
|
output 'Restarting MySQL process...'
|
||||||
service mysql restart
|
service mysql restart
|
||||||
elif [ -f /etc/mysql/my.cnf && grep -Fq "bind-address" /etc/mysql/my.cnf ] ; then
|
elif grep -Fqs "bind-address" /etc/mysql/my.cnf ; then
|
||||||
sed -i -- 's/bind-address/# bind-address/g' /etc/mysql/my.cnf
|
sed -i -- '/bind-address/s/#//g' /etc/mysql/my.cnf
|
||||||
sed -i -- '/bind-address/s/127.0.0.1/0.0.0.0/g' /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...'
|
output 'Restarting MySQL process...'
|
||||||
service mysql restart
|
service mysql restart
|
||||||
elif [ -f /etc/my.cnf && grep -Fq "bind-address" /etc/my.cnf ] ; then
|
elif grep -Fqs "bind-address" /etc/my.cnf ; then
|
||||||
sed -i -- 's/bind-address/# bind-address/g' /etc/my.cnf
|
sed -i -- '/bind-address/s/#//g' /etc/my.cnf
|
||||||
sed -i -- '/bind-address/s/127.0.0.1/0.0.0.0/g' /etc/my.cnf
|
sed -i -- '/bind-address/s/127.0.0.1/0.0.0.0/g' /etc/my.cnf
|
||||||
output 'Restarting MySQL process...'
|
output 'Restarting MySQL process...'
|
||||||
service mysql restart
|
service mysql restart
|
||||||
elif [ -f /etc/mysql/my.conf.d/mysqld.cnf && grep -Fq "bind-address" /etc/mysql/my.conf.d/mysqld.cnf ] ; then
|
elif grep -Fqs "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 -- '/bind-address/s/#//g' /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
|
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...'
|
output 'Restarting MySQL process...'
|
||||||
service mysql restart
|
service mysql restart
|
||||||
|
Loading…
Reference in New Issue
Block a user