mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-11-09 04:42:51 +00:00
Compare commits
1 Commits
openwebui
...
refactor_p
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
977377db2f |
@@ -42,9 +42,15 @@ function update_script() {
|
|||||||
msg_ok "Backup completed"
|
msg_ok "Backup completed"
|
||||||
|
|
||||||
PYTHON_VERSION="3.13" setup_uv
|
PYTHON_VERSION="3.13" setup_uv
|
||||||
fetch_and_deploy_gh_release "paperless" "paperless-ngx/paperless-ngx" "prebuild" "latest" "/opt/paperless" "paperless*tar.xz"
|
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "paperless" "paperless-ngx/paperless-ngx" "prebuild" "latest" "/opt/paperless" "paperless*tar.xz"
|
||||||
fetch_and_deploy_gh_release "jbig2enc" "ie13/jbig2enc" "tarball" "latest" "/opt/jbig2enc"
|
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "jbig2enc" "ie13/jbig2enc" "tarball" "latest" "/opt/jbig2enc"
|
||||||
setup_gs
|
|
||||||
|
. /etc/os-release
|
||||||
|
if [ "$VERSION_CODENAME" = "bookworm" ]; then
|
||||||
|
setup_gs
|
||||||
|
else
|
||||||
|
$STD apt install -y ghostscript
|
||||||
|
fi
|
||||||
|
|
||||||
msg_info "Updating Paperless-ngx"
|
msg_info "Updating Paperless-ngx"
|
||||||
cp -r /opt/paperless/backup/* /opt/paperless/
|
cp -r /opt/paperless/backup/* /opt/paperless/
|
||||||
@@ -53,6 +59,11 @@ function update_script() {
|
|||||||
cd /opt/paperless/src
|
cd /opt/paperless/src
|
||||||
$STD uv run -- python manage.py migrate
|
$STD uv run -- python manage.py migrate
|
||||||
msg_ok "Updated Paperless-ngx"
|
msg_ok "Updated Paperless-ngx"
|
||||||
|
|
||||||
|
if [[ -d /opt/paperless/backup ]]; then
|
||||||
|
rm -rf /opt/paperless/backup || msg_warn "Failed to remove /opt/paperless/backup"
|
||||||
|
msg_ok "Removed backup directory"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
msg_warn "You are about to migrate your Paperless-ngx installation to uv!"
|
msg_warn "You are about to migrate your Paperless-ngx installation to uv!"
|
||||||
msg_custom "🔒" "It is strongly recommended to take a Proxmox snapshot first:"
|
msg_custom "🔒" "It is strongly recommended to take a Proxmox snapshot first:"
|
||||||
@@ -103,9 +114,17 @@ function update_script() {
|
|||||||
msg_ok "Backup completed"
|
msg_ok "Backup completed"
|
||||||
|
|
||||||
PYTHON_VERSION="3.13" setup_uv
|
PYTHON_VERSION="3.13" setup_uv
|
||||||
fetch_and_deploy_gh_release "paperless" "paperless-ngx/paperless-ngx" "prebuild" "latest" "/opt/paperless" "paperless*tar.xz"
|
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "paperless" "paperless-ngx/paperless-ngx" "prebuild" "latest" "/opt/paperless" "paperless*tar.xz"
|
||||||
fetch_and_deploy_gh_release "jbig2enc" "ie13/jbig2enc" "tarball" "latest" "/opt/jbig2enc"
|
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "jbig2enc" "ie13/jbig2enc" "tarball" "latest" "/opt/jbig2enc"
|
||||||
setup_gs
|
|
||||||
|
. /etc/os-release
|
||||||
|
if [ "$VERSION_CODENAME" = "bookworm" ]; then
|
||||||
|
setup_gs
|
||||||
|
else
|
||||||
|
msg_info "Installing Ghostscript"
|
||||||
|
$STD apt install -y ghostscript
|
||||||
|
msg_ok "Installed Ghostscript"
|
||||||
|
fi
|
||||||
|
|
||||||
msg_info "Updating Paperless-ngx"
|
msg_info "Updating Paperless-ngx"
|
||||||
cp -r /opt/paperless/backup/* /opt/paperless/
|
cp -r /opt/paperless/backup/* /opt/paperless/
|
||||||
@@ -114,6 +133,11 @@ function update_script() {
|
|||||||
cd /opt/paperless/src
|
cd /opt/paperless/src
|
||||||
$STD uv run -- python manage.py migrate
|
$STD uv run -- python manage.py migrate
|
||||||
msg_ok "Paperless-ngx migration and update completed"
|
msg_ok "Paperless-ngx migration and update completed"
|
||||||
|
|
||||||
|
if [[ -d /opt/paperless/backup ]]; then
|
||||||
|
rm -rf /opt/paperless/backup || msg_warn "Failed to remove /opt/paperless/backup"
|
||||||
|
msg_ok "Removed backup directory"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
msg_info "Starting all Paperless-ngx Services"
|
msg_info "Starting all Paperless-ngx Services"
|
||||||
|
|||||||
@@ -17,11 +17,7 @@ msg_info "Installing Dependencies"
|
|||||||
$STD apt install -y ffmpeg
|
$STD apt install -y ffmpeg
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
PYTHON_VERSION="3.12" setup_uv
|
USE_UVX="YES" PYTHON_VERSION="3.12" setup_uv
|
||||||
|
|
||||||
msg_info "Installing Open WebUI"
|
|
||||||
$STD uv tool install --python 3.12 open-webui[all]
|
|
||||||
msg_ok "Installed Open WebUI"
|
|
||||||
|
|
||||||
read -r -p "${TAB3}Would you like to add Ollama? <y/N> " prompt
|
read -r -p "${TAB3}Would you like to add Ollama? <y/N> " prompt
|
||||||
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
|
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
|
||||||
@@ -60,7 +56,7 @@ After=network.target
|
|||||||
Type=simple
|
Type=simple
|
||||||
EnvironmentFile=-/root/.env
|
EnvironmentFile=-/root/.env
|
||||||
Environment=DATA_DIR=/root/.open-webui
|
Environment=DATA_DIR=/root/.open-webui
|
||||||
ExecStart=/root/.local/bin/open-webui serve
|
ExecStart=/usr/local/bin/uvx --python 3.12 open-webui@latest serve
|
||||||
WorkingDirectory=/root
|
WorkingDirectory=/root
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
RestartSec=5
|
RestartSec=5
|
||||||
|
|||||||
Reference in New Issue
Block a user