mirror of
				https://github.com/community-scripts/ProxmoxVE.git
				synced 2025-11-04 10:22:50 +00:00 
			
		
		
		
	Minio: use latest version or latest feature rich version (#5423)
* minio ref * Improvements * Update minio-install.sh
This commit is contained in:
		
							
								
								
									
										23
									
								
								ct/minio.sh
									
									
									
									
									
								
							
							
						
						
									
										23
									
								
								ct/minio.sh
									
									
									
									
									
								
							@@ -27,16 +27,33 @@ function update_script() {
 | 
			
		||||
    msg_error "No ${APP} Installation Found!"
 | 
			
		||||
    exit
 | 
			
		||||
  fi
 | 
			
		||||
  FEATURE_RICH_VERSION="2025-04-22T22-12-26Z"
 | 
			
		||||
  RELEASE=$(curl -fsSL https://api.github.com/repos/minio/minio/releases/latest | grep '"tag_name"' | awk -F '"' '{print $4}')
 | 
			
		||||
  if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
 | 
			
		||||
  CURRENT_VERSION=""
 | 
			
		||||
  [[ -f /opt/${APP}_version.txt ]] && CURRENT_VERSION=$(cat /opt/${APP}_version.txt)
 | 
			
		||||
  RELEASE=$(curl -fsSL https://api.github.com/repos/minio/minio/releases/latest | grep '"tag_name"' | awk -F '"' '{print $4}')
 | 
			
		||||
 | 
			
		||||
  if [[ "${CURRENT_VERSION}" == "${FEATURE_RICH_VERSION}" && "${RELEASE}" != "${FEATURE_RICH_VERSION}" ]]; then
 | 
			
		||||
    echo
 | 
			
		||||
    echo "You are currently running the last feature-rich community version: ${FEATURE_RICH_VERSION}"
 | 
			
		||||
    echo "WARNING: Updating to the latest version will REMOVE most management features from the Console UI."
 | 
			
		||||
    echo "Do you still want to upgrade to the latest version? [y/N]: "
 | 
			
		||||
    read -n 1 -r
 | 
			
		||||
    echo
 | 
			
		||||
    if [[ ! $REPLY =~ ^[Yy]$ ]]; then
 | 
			
		||||
      msg_ok "No update performed. Staying on the feature-rich version."
 | 
			
		||||
      exit
 | 
			
		||||
    fi
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  if [[ "${CURRENT_VERSION}" != "${RELEASE}" ]]; then
 | 
			
		||||
    msg_info "Stopping ${APP}"
 | 
			
		||||
    systemctl stop minio
 | 
			
		||||
    msg_ok "${APP} Stopped"
 | 
			
		||||
 | 
			
		||||
    msg_info "Updating ${APP} to ${RELEASE}"
 | 
			
		||||
    mv /usr/local/bin/minio /usr/local/bin/minio_bak
 | 
			
		||||
    curl -fsSL "https://dl.min.io/server/minio/release/linux-amd64/minio" -o $(basename "https://dl.min.io/server/minio/release/linux-amd64/minio")
 | 
			
		||||
    mv minio /usr/local/bin/
 | 
			
		||||
    curl -fsSL "https://dl.min.io/server/minio/release/linux-amd64/minio" -o /usr/local/bin/minio
 | 
			
		||||
    chmod +x /usr/local/bin/minio
 | 
			
		||||
    echo "${RELEASE}" >/opt/${APP}_version.txt
 | 
			
		||||
    msg_ok "Updated ${APP}"
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user