mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-05-21 08:05:02 +00:00
Ollama: Fix for latest version (#14596)
* fix * oops * Also in openwebui * removed unused .ollama file
This commit is contained in:
+5
-2
@@ -27,7 +27,10 @@ function update_script() {
|
||||
msg_error "No Ollama Installation Found!"
|
||||
exit
|
||||
fi
|
||||
if check_for_gh_release "ollama" "ollama/ollama"; then
|
||||
|
||||
[[ -f /root/.ollama ]] && rm -f /root/.ollama
|
||||
|
||||
if check_for_gh_release "ollama-com" "ollama/ollama"; then
|
||||
ensure_dependencies zstd
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop ollama
|
||||
@@ -36,7 +39,7 @@ function update_script() {
|
||||
OLLAMA_INSTALL_DIR="/usr/local/lib/ollama"
|
||||
rm -rf "$OLLAMA_INSTALL_DIR" /usr/local/bin/ollama
|
||||
mkdir -p "$OLLAMA_INSTALL_DIR"
|
||||
if ! fetch_and_deploy_gh_release "ollama" "ollama/ollama" "prebuild" "latest" "$OLLAMA_INSTALL_DIR" "ollama-linux-amd64.tar.zst"; then
|
||||
if ! fetch_and_deploy_gh_release "ollama-com" "ollama/ollama" "prebuild" "latest" "$OLLAMA_INSTALL_DIR" "ollama-linux-amd64.tar.zst"; then
|
||||
msg_error "Download or deployment failed – check network connectivity and GitHub API availability"
|
||||
exit 250
|
||||
fi
|
||||
|
||||
+3
-2
@@ -26,6 +26,7 @@ function update_script() {
|
||||
check_container_resources
|
||||
|
||||
ensure_dependencies zstd build-essential libmariadb-dev
|
||||
[[ -f /root/.ollama ]] && rm -f /root/.ollama
|
||||
|
||||
if [[ -d /opt/open-webui ]]; then
|
||||
msg_warn "Legacy installation detected — migrating to uv based install..."
|
||||
@@ -91,13 +92,13 @@ EOF
|
||||
|
||||
if [ -x "/usr/bin/ollama" ]; then
|
||||
msg_info "Checking for Ollama Update"
|
||||
if check_for_gh_release "ollama" "ollama/ollama"; then
|
||||
if check_for_gh_release "ollama-com" "ollama/ollama"; then
|
||||
msg_info "Stopping Ollama Service"
|
||||
systemctl stop ollama
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
rm -rf /usr/lib/ollama /usr/bin/ollama
|
||||
if ! fetch_and_deploy_gh_release "ollama" "ollama/ollama" "prebuild" "latest" "/usr/lib/ollama" "ollama-linux-amd64.tar.zst"; then
|
||||
if ! fetch_and_deploy_gh_release "ollama-com" "ollama/ollama" "prebuild" "latest" "/usr/lib/ollama" "ollama-linux-amd64.tar.zst"; then
|
||||
msg_error "Ollama download or deployment failed – check network connectivity and GitHub API availability"
|
||||
else
|
||||
ln -sf /usr/lib/ollama/bin/ollama /usr/bin/ollama
|
||||
|
||||
Reference in New Issue
Block a user