mirror of
https://github.com/tommytran732/Pterodactyl-Script
synced 2024-11-09 05:01:33 -05:00
Merge pull request #8 from Wqrld/patch-1
Fix mariadb binding on ubuntu servers.
This commit is contained in:
commit
935cba4084
12
install.sh
12
install.sh
@ -531,7 +531,12 @@ 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/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 -- '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 '/\[mysqld\]/a bind-address = 0.0.0.0' /etc/mysql/my.cnf
|
||||||
output 'Restarting MySQL process...'
|
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
|
sed -i '/\[mysqld\]/a bind-address = 0.0.0.0' /etc/mysql/my.conf.d/mysqld.cnf
|
||||||
output 'Restarting MySQL process...'
|
output 'Restarting MySQL process...'
|
||||||
service mysql restart
|
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
|
else
|
||||||
output 'File my.cnf was not found! Please contact support.'
|
output 'File my.cnf was not found! Please contact support.'
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user