This commit is contained in:
Slaviša Arežina
2025-11-05 14:20:33 +01:00
committed by GitHub
parent b2ee06d8cb
commit fb1a558dc6
3 changed files with 23 additions and 63 deletions

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2025 tteck
# Author: havardthom
# Author: tteck | Co-Author: havardthom | Co-Author: Slaviša Arežina (tremor021)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://openwebui.com/
@@ -11,7 +11,7 @@ var_cpu="${var_cpu:-4}"
var_ram="${var_ram:-8192}"
var_disk="${var_disk:-25}"
var_os="${var_os:-debian}"
var_version="${var_version:-12}"
var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
@@ -23,7 +23,7 @@ function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/open-webui ]]; then
if [[ ! -d /root/.open-webui ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
@@ -50,29 +50,8 @@ function update_script() {
fi
fi
msg_info "Updating ${APP} (Patience)"
cd /opt/open-webui
mkdir -p /opt/open-webui-backup
cp -rf /opt/open-webui/backend/data /opt/open-webui-backup
git add -A
$STD git stash
$STD git reset --hard
output=$(git pull --no-rebase)
if echo "$output" | grep -q "Already up to date."; then
msg_ok "$APP is already up to date."
exit
fi
systemctl stop open-webui.service
$STD npm install --force
export NODE_OPTIONS="--max-old-space-size=6000"
$STD npm run build
cd ./backend
$STD pip install -r requirements.txt -U
cp -rf /opt/open-webui-backup/* /opt/open-webui/backend
if git stash list | grep -q 'stash@{'; then
$STD git stash pop
fi
systemctl start open-webui.service
msg_info "Restarting Open WebUI to initiate update"
systemctl restart open-webui
msg_ok "Updated successfully!"
exit
}