You've already forked Proxmox-Widget-Toolkit-Wrapper
Inital Commit
This commit is contained in:
10
root/DEBIAN/control
Normal file
10
root/DEBIAN/control
Normal 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
33
root/DEBIAN/postinst
Executable 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
23
root/DEBIAN/postrm
Executable 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
15
root/DEBIAN/prerm
Normal 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
|
||||
11
root/lib/systemd/system/proxmox-widget-toolkit.service
Normal file
11
root/lib/systemd/system/proxmox-widget-toolkit.service
Normal 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
|
||||
21
root/usr/lib/proxmox-widget-toolkit/proxmox-no-subscription
Normal file
21
root/usr/lib/proxmox-widget-toolkit/proxmox-no-subscription
Normal 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'
|
||||
Reference in New Issue
Block a user