Skip to content

Commit

Permalink
Merge pull request #5 from phaefner1/master
Browse files Browse the repository at this point in the history
Added execution of bind_addres_fix function
  • Loading branch information
abien authored Dec 7, 2023
2 parents ea15f30 + be58c6c commit 28428b6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mariadb-upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ gpgcheck=1" >/etc/yum.repos.d/mariadb.repo
exit 1
fi

if [ "$MDB_VER" = "10.6" ]; then
bind_address_fix
fi

echo "- Starting MariaDB $MDB_VER"
if [ "$MDB_VER" = "10.0" ]; then
systemctl restart mysql
Expand All @@ -153,7 +157,7 @@ bind_address_fix() {
echo "Fixing bind-address.."

# Grep and replace (via sed)
grep -q "bind-address = ::ffff:127.0.0.1" $CONFIG_FILE && sed -i 's/bind-address = ::ffff:127.0.0.1/#bind-address = ::ffff:127.0.0.1/' $CONFIG_FILE
grep -q "bind-address = ::ffff:127.0.0.1" $CONFIG_FILE && sed -i 's/bind-address = ::ffff:127.0.0.1//' $CONFIG_FILE

# If bind-address isnt set
if ! grep -q "bind-address = " $CONFIG_FILE; then
Expand Down

0 comments on commit 28428b6

Please sign in to comment.