Update openwebui.sh (#5601)
This commit is contained in:
parent
70f43cb904
commit
0232dbd89d
@ -30,11 +30,11 @@ function update_script() {
|
|||||||
|
|
||||||
if [ -x "/usr/bin/ollama" ]; then
|
if [ -x "/usr/bin/ollama" ]; then
|
||||||
msg_info "Updating Ollama"
|
msg_info "Updating Ollama"
|
||||||
rm -rf /usr/lib/ollama
|
|
||||||
rm -rf /usr/bin/ollama
|
|
||||||
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
|
||||||
|
rm -rf /usr/lib/ollama
|
||||||
|
rm -rf /usr/bin/ollama
|
||||||
curl -fsSLO https://ollama.com/download/ollama-linux-amd64.tgz
|
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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user