Inital Commit
All checks were successful
Proxmox Widget Toolkit Wrapper / Proxmox Widget Toolkit Wrapper [arm64] (push) Successful in 11s
Proxmox Widget Toolkit Wrapper / Proxmox Widget Toolkit Wrapper [amd64] (push) Successful in 11s

This commit is contained in:
Cantibra
2025-10-26 21:11:05 +01:00
commit 5a830d518f
11 changed files with 739 additions and 0 deletions

10
root/DEBIAN/control Normal file
View File

@@ -0,0 +1,10 @@
Package: proxmox-widget-toolkit-wrapper
Version: 1.0.0
Architecture:
Installed-Size:
Depends: proxmox-widget-toolkit
Priority: optional
Section: web
Homepage: http://www.privlab.it
Maintainer: PrivLab <hostmaster@privlab.it>
Description: Wrapper for the Proxmox Web UIs

33
root/DEBIAN/postinst Executable file
View File

@@ -0,0 +1,33 @@
#!/usr/bin/sh
set -e
set -u
. /etc/os-release
case "${1}" in
configure)
if [ -x '/usr/bin/deb-systemd-helper' ]; then
/usr/bin/deb-systemd-helper unmask 'proxmox-widget-toolkit.service' > '/dev/null' 2>&1 || \
/usr/bin/true
fi
if /usr/bin/deb-systemd-helper --quiet was-enabled 'proxmox-widget-toolkit.service'; then
/usr/bin/deb-systemd-helper enable 'proxmox-widget-toolkit.service' > '/dev/null' 2>&1 || \
/usr/bin/true
else
/usr/bin/deb-systemd-helper update-state 'proxmox-widget-toolkit.service' > '/dev/null' 2>&1 || \
/usr/bin/true
fi
if [ -x '/usr/bin/deb-systemd-invoke' ]; then
/usr/bin/systemctl --system daemon-reload > '/dev/null' 2>&1 || \
/usr/bin/true
if [ -n "${2}" ]; then
_dh_action='restart'
else
_dh_action='start'
fi
/usr/bin/deb-systemd-invoke "${_dh_action}" 'proxmox-widget-toolkit.service' > '/dev/null' 2>&1 || \
/usr/bin/true
fi
;;
esac

23
root/DEBIAN/postrm Executable file
View File

@@ -0,0 +1,23 @@
#!/usr/bin/sh
set -e
set -u
case "${1}" in
remove)
if [ -x '/usr/bin/deb-systemd-helper' ]; then
/usr/bin/deb-systemd-helper mask 'proxmox-widget-toolkit.service' > '/dev/null' 2>&1 || \
/usr/bin/true
/usr/bin/deb-systemd-helper mask 'proxmox-widget-toolkit.service' > '/dev/null' 2>&1 || \
/usr/bin/true
fi
;;
purge)
if [ -x '/usr/bin/deb-systemd-helper' ]; then
/usr/bin/deb-systemd-helper purge 'proxmox-widget-toolkit.service' > '/dev/null' 2>&1 || \
/usr/bin/true
/usr/bin/deb-systemd-helper unmask 'proxmox-widget-toolkit.service' > '/dev/null' 2>&1 || \
/usr/bin/true
fi
;;
esac

15
root/DEBIAN/prerm Normal file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/sh
set -e
set -u
case "${1}" in
remove)
if [ -x '/usr/bin/deb-systemd-invoke' ]; then
/usr/bin/deb-systemd-invoke stop 'proxmox-widget-toolkit.service' > '/dev/null' 2>&1 || \
/usr/bin/true
/usr/bin/deb-systemd-invoke disable 'proxmox-widget-toolkit.service' > '/dev/null' 2>&1 || \
/usr/bin/true
fi
;;
esac

View File

@@ -0,0 +1,11 @@
[Unit]
Description=Wrapper for the Proxmox Web UIs
Before=pveproxy.service proxmox-backup.service
RequiredBy=pveproxy.service proxmox-backup.service
[Service]
Type=oneshot
ExecStart=/usr/lib/proxmox-widget-toolkit/proxmox-no-subscription
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,21 @@
#!/usr/bin/sh
###
#
# Runtime Environment
#
###
if ! /usr/bin/sed --quiet '/checked_command: function (orig_cmd) {/,/Proxmox.Utils.API2Request/p' '/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js' | \
/usr/bin/grep --quiet 'return;'; then
/usr/bin/sed --in-place \
'/checked_command: function (orig_cmd) {/a\ return;' \
'/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js'
fi
/usr/bin/sed --in-place \
"s/return 'no-repo';/return 'non-production';/g" \
'/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js'
/usr/bin/sed --in-place \
"/!enterprise && !nosubscription && !test/,/);/s/addCritical/addWarn/; /No {0} repository is enabled, you do not get any updates!/s/No {0} repository is enabled, you do not get any updates!/The {0}test repository may pull in unstable updates and is not recommended for production use!/" \
'/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js'