This commit is contained in:
carlospolop 2025-07-01 12:12:01 +02:00
parent a745f00dd7
commit 6fd96f4bdb

View File

@ -111,8 +111,7 @@ process_info=$(ps aux | grep '[m]ysqld' | head -n1)
if [ -z "$process_info" ]; then
echo "MySQL process not found." | sed -${E} "s,.*,${SED_GREEN},"
exit 1
fi
else
# Extract the process user
mysqluser=$(echo "$process_info" | awk '{print $1}')
@ -125,8 +124,7 @@ version=$(echo "$version_output" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -n1)
if [ -z "$version" ]; then
echo "Unable to determine MySQL version." | sed -${E} "s,.*,${SED_GREEN},"
exit 1
fi
else
# Extract the major version number (X from X.Y.Z)
major_version=$(echo "$version" | cut -d. -f1)
@ -140,3 +138,6 @@ else
echo "MySQL is running as user '$mysqluser' with version $version." | sed -${E} "s,.*,${SED_GREEN},"
fi
### ------------------------------------------------------------------------------------------------------------------------------------------------ ###
fi
fi