You've already forked Proxmox-Widget-Toolkit-Wrapper
22 lines
987 B
Bash
22 lines
987 B
Bash
#!/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'
|