Compare commits

..
Author SHA1 Message Date
MickLesk fb1df525e8 post-pmg-install: reinstall the mobile quarantine UI only where it exists
pmg-mobile-quarantine-ui is not in the PMG 8 (bookworm) repository, so
naming it in the reinstall made apt abort there and skip the widget
toolkit reinstall as well.
2026-10-24 20:03:28 +02:00
MickLesk 2d78d58fe1 post-pmg-install: hide the subscription nag in the PMG 9 mobile quarantine
PMG 9 replaced pmgmanagerlib-mobile.js with the Yew/WASM app in
pmg-mobile-quarantine-ui, so the mobile hook no longer found its file.
The status check is compiled into the WASM, so the helper now injects a
fetch wrapper into the mobile index template that reports the
subscription as active to the app. The API response itself is unchanged.

All patches move into /usr/local/bin/pmg-remove-nag.sh behind a single
apt hook. "no" now also removes the mobile hook and the helper, and the
reinstall covers pmg-mobile-quarantine-ui so its template is restored.

Fixes #16217
2026-10-24 19:40:04 +02:00
community-scripts-pr-app[bot]andgithub-actions[bot] a1e156baa7 Update CHANGELOG.md (#18138)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-24 17:27:59 +00:00
rhclayto 658cb8683b Update patchmon-install.sh (#18074)
Avoids systemd environment secret leaks via D-Bus/subprocesses.
2026-10-24 19:27:28 +02:00
5 changed files with 45 additions and 70 deletions

No files matched your search

+1
View File
@@ -571,6 +571,7 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
- #### 🐞 Bug Fixes
- patchmon: avoids systemd environment secret leaks via D-Bus/subprocesses. [@rhclayto](https://github.com/rhclayto) ([#18074](https://github.com/community-scripts/ProxmoxVE/pull/18074))
- fix: Linkwarden - clear Yarn berry cache after install and update- #18115 [@bferd](https://github.com/bferd) ([#18116](https://github.com/community-scripts/ProxmoxVE/pull/18116))
- Borg-UI: recreate the borg venvs with --clear [@MickLesk](https://github.com/MickLesk) ([#18118](https://github.com/community-scripts/ProxmoxVE/pull/18118))
- SnapOtter: recreate the AI venv with --clear [@MickLesk](https://github.com/MickLesk) ([#18119](https://github.com/community-scripts/ProxmoxVE/pull/18119))
+2 -36
View File
@@ -34,43 +34,9 @@ function update_script() {
PYTHON_VERSION="3.12" setup_uv
NODE_VERSION="22" NODE_MODULE="corepack" setup_nodejs
if ! grep -q '^CELERY_CONFIG=' /opt/gramps-web/config/config.cfg; then
msg_info "Setting up Celery Task Queue"
ensure_dependencies redis-server
cat <<EOF >>/opt/gramps-web/config/config.cfg
CELERY_CONFIG={"broker_url":"redis://127.0.0.1:6379/0","result_backend":"redis://127.0.0.1:6379/0"}
RATELIMIT_STORAGE_URI="redis://127.0.0.1:6379/1"
EOF
cat <<EOF >/etc/systemd/system/gramps-web-celery.service
[Unit]
Description=Gramps Web Celery Worker
After=network.target redis-server.service
Wants=redis-server.service
[Service]
Type=simple
User=root
WorkingDirectory=/opt/gramps-web-api
Environment=GRAMPS_API_CONFIG=/opt/gramps-web/config/config.cfg
Environment=GRAMPSHOME=/opt/gramps-web/data
Environment=GRAMPS_DATABASE_PATH=/opt/gramps-web/data/gramps/grampsdb
Environment=PATH=/opt/gramps-web/venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ExecStart=/opt/gramps-web/venv/bin/celery -A gramps_webapi.celery worker --loglevel=INFO --concurrency=2
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable -q --now redis-server gramps-web-celery
systemctl restart gramps-web
msg_ok "Set up Celery Task Queue"
fi
if check_for_gh_release "gramps-web-api" "gramps-project/gramps-web-api"; then
msg_info "Stopping Service"
systemctl stop gramps-web gramps-web-celery
systemctl stop gramps-web
msg_ok "Stopped Service"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "gramps-web-api" "gramps-project/gramps-web-api" "tarball" "latest" "/opt/gramps-web-api"
@@ -105,7 +71,7 @@ EOF
msg_ok "Updated Gramps Addons"
msg_info "Starting Service"
systemctl start gramps-web gramps-web-celery
systemctl start gramps-web
msg_ok "Started Service"
fi
+2 -27
View File
@@ -34,7 +34,6 @@ $STD apt install -y \
pkg-config \
poppler-utils \
python3-dev \
redis-server \
tesseract-ocr
msg_ok "Installed Dependencies"
@@ -71,8 +70,6 @@ REQUEST_CACHE_CONFIG={"CACHE_TYPE":"FileSystemCache","CACHE_DIR":"/opt/gramps-we
PERSISTENT_CACHE_CONFIG={"CACHE_TYPE":"FileSystemCache","CACHE_DIR":"/opt/gramps-web/data/cache/persistent","CACHE_THRESHOLD":0,"CACHE_DEFAULT_TIMEOUT":0}
REPORT_DIR="/opt/gramps-web/data/cache/report"
EXPORT_DIR="/opt/gramps-web/data/cache/export"
CELERY_CONFIG={"broker_url":"redis://127.0.0.1:6379/0","result_backend":"redis://127.0.0.1:6379/0"}
RATELIMIT_STORAGE_URI="redis://127.0.0.1:6379/1"
EOF
$STD uv venv -c -p python3.12 /opt/gramps-web/venv
source /opt/gramps-web/venv/bin/activate
@@ -110,8 +107,7 @@ msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/gramps-web.service
[Unit]
Description=Gramps Web Service
After=network.target redis-server.service
Wants=redis-server.service
After=network.target
[Service]
Type=simple
@@ -128,28 +124,7 @@ RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
cat <<EOF >/etc/systemd/system/gramps-web-celery.service
[Unit]
Description=Gramps Web Celery Worker
After=network.target redis-server.service
Wants=redis-server.service
[Service]
Type=simple
User=root
WorkingDirectory=/opt/gramps-web-api
Environment=GRAMPS_API_CONFIG=/opt/gramps-web/config/config.cfg
Environment=GRAMPSHOME=/opt/gramps-web/data
Environment=GRAMPS_DATABASE_PATH=/opt/gramps-web/data/gramps/grampsdb
Environment=PATH=/opt/gramps-web/venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ExecStart=/opt/gramps-web/venv/bin/celery -A gramps_webapi.celery worker --loglevel=INFO --concurrency=2
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now gramps-web gramps-web-celery
systemctl enable -q --now gramps-web
msg_ok "Created Service"
motd_ssh
+1 -1
View File
@@ -107,7 +107,7 @@ ExecStart=/opt/patchmon/patchmon-server
Restart=always
RestartSec=10
Environment=PATH=/usr/bin:/usr/local/bin
EnvironmentFile=/opt/patchmon/.env
Environment=ENV_FILE=/opt/patchmon/.env
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
+39 -6
View File
@@ -314,21 +314,54 @@ EOF
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Support Subscriptions" \
"Supporting the software's development team is essential.\nPlease consider buying a subscription." 10 58
msg_info "Disabling subscription nag"
cat >/etc/apt/apt.conf.d/no-nag-script <<'EOF'
DPkg::Post-Invoke { "if [ -s /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js ] && ! grep -q -F 'NoMoreNagging' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; then sed -i '/data\.status/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; fi"; };
EOF
mkdir -p /usr/local/bin
cat >/usr/local/bin/pmg-remove-nag.sh <<'EOF'
#!/bin/sh
WEB_JS=/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
if [ -s "$WEB_JS" ] && ! grep -q NoMoreNagging "$WEB_JS"; then
sed -i '/data\.status/{s/\!//;s/active/NoMoreNagging/}' "$WEB_JS"
fi
cat >/etc/apt/apt.conf.d/no-nag-script-pmgmanagerlib-mobile <<'EOF'
DPkg::Post-Invoke { "if [ -s /usr/share/javascript/pmg-gui/js/pmgmanagerlib-mobile.js ] && ! grep -q -F 'NoMoreNagging' /usr/share/javascript/pmg-gui/js/pmgmanagerlib-mobile.js; then sed -i '/data\.status/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/pmg-gui/js/pmgmanagerlib-mobile.js; fi"; };
MOBILE_JS=/usr/share/javascript/pmg-gui/js/pmgmanagerlib-mobile.js
if [ -s "$MOBILE_JS" ] && ! grep -q NoMoreNagging "$MOBILE_JS"; then
sed -i '/data\.status/{s/\!//;s/active/NoMoreNagging/}' "$MOBILE_JS"
fi
MOBILE_TPL=/usr/share/pmg-mobile-quarantine-ui/pmg-mobile-index.html.tt
if [ -s "$MOBILE_TPL" ] && ! grep -q NoMoreNagging "$MOBILE_TPL"; then
sed -i '/<head>/r /dev/stdin' "$MOBILE_TPL" <<'HTML'
<script>
// NoMoreNagging
const nativeFetch = window.fetch.bind(window);
window.fetch = async (...args) => {
const res = await nativeFetch(...args);
if (!String(args[0]?.url ?? args[0]).includes('/nodes/localhost/subscription')) return res;
const body = await res.clone().json().catch(() => null);
if (!body?.data) return res;
body.data.status = 'active';
return new Response(JSON.stringify(body), { status: res.status, headers: res.headers });
};
</script>
HTML
fi
EOF
chmod 755 /usr/local/bin/pmg-remove-nag.sh
cat >/etc/apt/apt.conf.d/no-nag-script <<'EOF'
DPkg::Post-Invoke { "/usr/local/bin/pmg-remove-nag.sh"; };
EOF
rm -f /etc/apt/apt.conf.d/no-nag-script-pmgmanagerlib-mobile
msg_ok "Disabled subscription nag (clear browser cache!)"
;;
no)
msg_error "Selected no to Disabling subscription nag"
rm -f /etc/apt/apt.conf.d/no-nag-script 2>/dev/null
rm -f /etc/apt/apt.conf.d/no-nag-script /etc/apt/apt.conf.d/no-nag-script-pmgmanagerlib-mobile /usr/local/bin/pmg-remove-nag.sh
;;
esac
apt --reinstall install proxmox-widget-toolkit pmg-gui &>/dev/null || msg_error "Widget toolkit reinstall failed"
if dpkg -s pmg-mobile-quarantine-ui &>/dev/null; then
apt --reinstall install pmg-mobile-quarantine-ui &>/dev/null || msg_error "Mobile quarantine UI reinstall failed"
fi
# ---- UPDATE ----
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UPDATE" --menu \