mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-09-13 15:43:02 +00:00
Update openwebui.sh (#7582)
This commit is contained in:
parent
f03f004226
commit
f4df8e2ccc
@ -33,11 +33,17 @@ function update_script() {
|
|||||||
OLLAMA_VERSION=$(ollama -v | awk '{print $NF}')
|
OLLAMA_VERSION=$(ollama -v | awk '{print $NF}')
|
||||||
RELEASE=$(curl -s https://api.github.com/repos/ollama/ollama/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4)}')
|
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
|
if [ "$OLLAMA_VERSION" != "$RELEASE" ]; then
|
||||||
|
msg_info "Stopping Service"
|
||||||
|
systemctl stop ollama
|
||||||
|
msg_ok "Stopped Service"
|
||||||
|
curl -fsSLO https://ollama.com/download/ollama-linux-amd64.tgz
|
||||||
rm -rf /usr/lib/ollama
|
rm -rf /usr/lib/ollama
|
||||||
rm -rf /usr/bin/ollama
|
rm -rf /usr/bin/ollama
|
||||||
curl -fsSLO https://ollama.com/download/ollama-linux-amd64.tgz
|
|
||||||
tar -C /usr -xzf ollama-linux-amd64.tgz
|
tar -C /usr -xzf ollama-linux-amd64.tgz
|
||||||
rm -rf ollama-linux-amd64.tgz
|
rm -rf ollama-linux-amd64.tgz
|
||||||
|
msg_info "Starting Service"
|
||||||
|
systemctl start ollama
|
||||||
|
msg_info "Started Service"
|
||||||
msg_ok "Ollama updated to version $RELEASE"
|
msg_ok "Ollama updated to version $RELEASE"
|
||||||
else
|
else
|
||||||
msg_ok "Ollama is already up to date."
|
msg_ok "Ollama is already up to date."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user