Fix no-subscription-hack

This commit is contained in:
2025-07-28 13:48:56 +02:00
parent cbef6ed38b
commit 305987a6f9

View File

@@ -262,10 +262,16 @@ suppress_no_subscription_warning(){
if [ $suppress_warning -gt 0 ]; then
cat << EOF > /usr/local/bin/suppress_no_subscription_warning
#!/bin/bash
# Proxmox no-subsscription hack
# Proxmox no-subscription hack
filename=/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
# Prüfe, ob checked_command bereits im gewünschten Zustand ist
if grep -q 'checked_command: function(orig_cmd) { orig_cmd(); },' "\$filename"; then
echo "checked_command bereits gepatcht, keine Änderung notwendig."
exit 0
fi
# Finde die erste Zeile mit checked_command
first_line=\$(grep -n -m1 'checked_command' "\$filename" | cut -d':' -f1)
# Hole die Einrückung der Startzeile