mirror of
				https://github.com/community-scripts/ProxmoxVE.git
				synced 2025-11-04 02:12:49 +00:00 
			
		
		
		
	Open WebUI: Add Ollama update check (#3478)
* Add Ollama update check * Update openwebui.sh * Fix Ollama update * fixes
This commit is contained in:
		@@ -27,6 +27,21 @@ function update_script() {
 | 
			
		||||
    msg_error "No ${APP} Installation Found!"
 | 
			
		||||
    exit
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  OLLAMA_VERSION=$(ollama -v | awk '{print $NF}')
 | 
			
		||||
  if [ -n "$OLLAMA_VERSION" ]; then
 | 
			
		||||
    RELEASE=$(curl -s https://api.github.com/repos/ollama/ollama/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
 | 
			
		||||
    if [ "$OLLAMA_VERSION" != "$RELEASE" ]; then
 | 
			
		||||
      msg_info "Updating Ollama"
 | 
			
		||||
      curl -fsSLO https://ollama.com/download/ollama-linux-amd64.tgz
 | 
			
		||||
      tar -C /usr -xzf ollama-linux-amd64.tgz
 | 
			
		||||
      rm -rf ollama-linux-amd64.tgz
 | 
			
		||||
      msg_ok "Ollama updated to version $RELEASE"
 | 
			
		||||
    else
 | 
			
		||||
      msg_ok "Ollama is already up to date."
 | 
			
		||||
    fi
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  msg_info "Updating ${APP} (Patience)"
 | 
			
		||||
  cd /opt/open-webui
 | 
			
		||||
  mkdir -p /opt/open-webui-backup
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user