1
0
mirror of https://github.com/community-scripts/ProxmoxVE.git synced 2025-04-20 05:28:06 +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:
Slaviša Arežina 2025-03-30 11:43:44 +02:00 committed by GitHub
parent 3939b88b9f
commit df41b8e707
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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