mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-11-08 20:32:49 +00:00
Compare commits
6 Commits
update_ver
...
refactor_p
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
977377db2f | ||
|
|
8cb1675f89 | ||
|
|
a4ccf7d1b0 | ||
|
|
db29b241a9 | ||
|
|
528575f737 | ||
|
|
ac05febbbd |
@@ -16,6 +16,8 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Technitium DNS: Fix update [@tremor021](https://github.com/tremor021) ([#8980](https://github.com/community-scripts/ProxmoxVE/pull/8980))
|
||||
- MediaManager: add LOG_FILE to start.sh script; fix BASE_PATH and PUBLIC_API_URL [@vhsdream](https://github.com/vhsdream) ([#8981](https://github.com/community-scripts/ProxmoxVE/pull/8981))
|
||||
- Firefly: Fix missing command in update script [@tremor021](https://github.com/tremor021) ([#8972](https://github.com/community-scripts/ProxmoxVE/pull/8972))
|
||||
- MongoDB: Remove unused message [@tremor021](https://github.com/tremor021) ([#8969](https://github.com/community-scripts/ProxmoxVE/pull/8969))
|
||||
- Set TZ=Etc/UTC in Ghostfolio installation script [@LuloDev](https://github.com/LuloDev) ([#8961](https://github.com/community-scripts/ProxmoxVE/pull/8961))
|
||||
|
||||
@@ -40,19 +40,24 @@ function update_script() {
|
||||
MM_DIR="/opt/mm"
|
||||
export CONFIG_DIR="${MM_DIR}/config"
|
||||
export FRONTEND_FILES_DIR="${MM_DIR}/web/build"
|
||||
export BASE_PATH=""
|
||||
export PUBLIC_VERSION=""
|
||||
export PUBLIC_API_URL=""
|
||||
export BASE_PATH="/web"
|
||||
cd /opt/mediamanager/web
|
||||
$STD npm ci
|
||||
$STD npm ci --no-fund --no-audit
|
||||
$STD npm run build
|
||||
rm -rf "$FRONTEND_FILES_DIR"/build
|
||||
cp -r build "$FRONTEND_FILES_DIR"
|
||||
export BASE_PATH=""
|
||||
export VIRTUAL_ENV="/opt/${MM_DIR}/venv"
|
||||
cd /opt/mediamanager
|
||||
rm -rf "$MM_DIR"/{media_manager,alembic*}
|
||||
cp -r {media_manager,alembic*} "$MM_DIR"
|
||||
$STD /usr/local/bin/uv sync --locked --active -n -p cpython3.13 --managed-python
|
||||
if ! grep -q "LOG_FILE" "$MM_DIR"/start.sh; then
|
||||
sed -i "\|build\"$|a\export LOG_FILE=\"$CONFIG_DIR/media_manager.log\"" "$MM_DIR"/start.sh
|
||||
fi
|
||||
|
||||
msg_ok "Updated $APP"
|
||||
|
||||
msg_info "Starting Service"
|
||||
|
||||
@@ -42,9 +42,15 @@ function update_script() {
|
||||
msg_ok "Backup completed"
|
||||
|
||||
PYTHON_VERSION="3.13" setup_uv
|
||||
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"
|
||||
setup_gs
|
||||
CLEAN_INSTALL=1 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 "jbig2enc" "ie13/jbig2enc" "tarball" "latest" "/opt/jbig2enc"
|
||||
|
||||
. /etc/os-release
|
||||
if [ "$VERSION_CODENAME" = "bookworm" ]; then
|
||||
setup_gs
|
||||
else
|
||||
$STD apt install -y ghostscript
|
||||
fi
|
||||
|
||||
msg_info "Updating Paperless-ngx"
|
||||
cp -r /opt/paperless/backup/* /opt/paperless/
|
||||
@@ -53,6 +59,11 @@ function update_script() {
|
||||
cd /opt/paperless/src
|
||||
$STD uv run -- python manage.py migrate
|
||||
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
|
||||
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:"
|
||||
@@ -103,9 +114,17 @@ function update_script() {
|
||||
msg_ok "Backup completed"
|
||||
|
||||
PYTHON_VERSION="3.13" setup_uv
|
||||
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"
|
||||
setup_gs
|
||||
CLEAN_INSTALL=1 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 "jbig2enc" "ie13/jbig2enc" "tarball" "latest" "/opt/jbig2enc"
|
||||
|
||||
. /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"
|
||||
cp -r /opt/paperless/backup/* /opt/paperless/
|
||||
@@ -114,6 +133,11 @@ function update_script() {
|
||||
cd /opt/paperless/src
|
||||
$STD uv run -- python manage.py migrate
|
||||
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
|
||||
|
||||
msg_info "Starting all Paperless-ngx Services"
|
||||
|
||||
@@ -28,6 +28,11 @@ function update_script() {
|
||||
exit
|
||||
fi
|
||||
|
||||
if is_package_installed "aspnetcore-runtime-8.0"; then
|
||||
$STD apt remove -y aspnetcore-runtime-8.0
|
||||
$STD apt install -y aspnetcore-runtime-9.0
|
||||
fi
|
||||
|
||||
RELEASE=$(curl -fsSL https://technitium.com/dns/ | grep -oP 'Version \K[\d.]+')
|
||||
if [[ ! -f ~/.technitium || "${RELEASE}" != "$(cat ~/.technitium)" ]]; then
|
||||
msg_info "Updating Technitium DNS"
|
||||
|
||||
@@ -45,15 +45,15 @@ MM_DIR="/opt/mm"
|
||||
MEDIA_DIR="${MM_DIR}/media"
|
||||
export CONFIG_DIR="${MM_DIR}/config"
|
||||
export FRONTEND_FILES_DIR="${MM_DIR}/web/build"
|
||||
export BASE_PATH=""
|
||||
export PUBLIC_VERSION=""
|
||||
export PUBLIC_API_URL=""
|
||||
export BASE_PATH=""
|
||||
export BASE_PATH="/web"
|
||||
cd /opt/mediamanager/web
|
||||
$STD npm ci
|
||||
$STD npm ci --no-fund --no-audit
|
||||
$STD npm run build
|
||||
mkdir -p {"$MM_DIR"/web,"$MEDIA_DIR","$CONFIG_DIR"}
|
||||
cp -r build "$FRONTEND_FILES_DIR"
|
||||
export BASE_PATH=""
|
||||
export VIRTUAL_ENV="${MM_DIR}/venv"
|
||||
cd /opt/mediamanager
|
||||
cp -r {media_manager,alembic*} "$MM_DIR"
|
||||
@@ -81,8 +81,9 @@ cat <<EOF >"$MM_DIR"/start.sh
|
||||
|
||||
export CONFIG_DIR="$CONFIG_DIR"
|
||||
export FRONTEND_FILES_DIR="$FRONTEND_FILES_DIR"
|
||||
export LOG_FILE="$CONFIG_DIR/media_manager.log"
|
||||
export BASE_PATH=""
|
||||
cd "$MM_DIR"
|
||||
cd $MM_DIR
|
||||
source ./venv/bin/activate
|
||||
/usr/local/bin/uv run alembic upgrade head
|
||||
/usr/local/bin/uv run fastapi run ./media_manager/main.py --port 8000
|
||||
|
||||
@@ -18,7 +18,7 @@ curl -fsSL "https://packages.microsoft.com/config/debian/12/packages-microsoft-p
|
||||
$STD dpkg -i packages-microsoft-prod.deb
|
||||
rm -rf packages-microsoft-prod.deb
|
||||
$STD apt update
|
||||
$STD apt install -y aspnetcore-runtime-8.0
|
||||
$STD apt install -y aspnetcore-runtime-9.0
|
||||
msg_ok "Installed ASP.NET Core Runtime"
|
||||
|
||||
RELEASE=$(curl -fsSL https://technitium.com/dns/ | grep -oP 'Version \K[\d.]+')
|
||||
@@ -26,20 +26,15 @@ msg_info "Installing Technitium DNS"
|
||||
mkdir -p /opt/technitium/dns
|
||||
curl -fsSL "https://download.technitium.com/dns/DnsServerPortable.tar.gz" -o /opt/DnsServerPortable.tar.gz
|
||||
$STD tar zxvf /opt/DnsServerPortable.tar.gz -C /opt/technitium/dns/
|
||||
rm -f /opt/DnsServerPortable.tar.gz
|
||||
echo "${RELEASE}" >~/.technitium
|
||||
msg_ok "Installed Technitium DNS"
|
||||
|
||||
msg_info "Creating service"
|
||||
cp /opt/technitium/dns/systemd.service /etc/systemd/system/technitium.service
|
||||
systemctl enable -q --now technitium
|
||||
systemctl enable -q --now technitium
|
||||
msg_ok "Service created"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -f /opt/DnsServerPortable.tar.gz
|
||||
$STD apt -y autoremove
|
||||
$STD apt -y autoclean
|
||||
$STD apt -y clean
|
||||
msg_ok "Cleaned"
|
||||
cleanup_lxc
|
||||
|
||||
Reference in New Issue
Block a user