mirror of
				https://github.com/community-scripts/ProxmoxVE.git
				synced 2025-11-04 10:22:50 +00:00 
			
		
		
		
	Fix regex to extract MySQL version correctly (#7774)
This commit is contained in:
		@@ -1322,7 +1322,7 @@ function setup_mysql() {
 | 
			
		||||
  CURRENT_OS="$(awk -F= '/^ID=/{print $2}' /etc/os-release)"
 | 
			
		||||
 | 
			
		||||
  if command -v mysql >/dev/null; then
 | 
			
		||||
    CURRENT_VERSION="$(mysql --version | grep -oP 'Distrib\s+\K[0-9]+\.[0-9]+')"
 | 
			
		||||
    CURRENT_VERSION="$(mysql --version | grep -oP '[0-9]+\.[0-9]+' | head -n1)"
 | 
			
		||||
    if [[ "$CURRENT_VERSION" != "$MYSQL_VERSION" ]]; then
 | 
			
		||||
      $STD msg_info "MySQL $CURRENT_VERSION will be upgraded to $MYSQL_VERSION"
 | 
			
		||||
      NEED_INSTALL=true
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user