This note is taken from my ProxmoxMaster repository.
#!/bin/bash# AUTHOR: Tyler McCann (@tylerdotrar)# ARBITRARY VERSION NUMBER: 1.0.0# LINK: https://github.com/tylerdotrar/ProxmoxMaster# Validate script is being ran with elevated privilegesif["$EUID"-ne0]thenecho"Script must be ran as root."exitfi# Visual formatting of output
print_yellow(){echo-e"$(tputsetaf3)$1$(tputsetaf7)"}# Target File(s)sub_file='/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js'sub_file_bak="${sub_file}.bak"# Backup of original file### Step 1: Remove 'No valid subscription' message.
print_yellow"[+] Voiding 'No valid subscription' message from '$sub_file'..."# Create backup of target file
cp$sub_file$sub_file_bak
print_yellow" o Backup file created: '$sub_file_bak'"# Get line number of unique string (- 1) and replace contentsline=$(grep-n'No valid subscription'$sub_file|cut-f1-d:)line_p2=$((line-1))
sed-i"${line_p2}c\\\t\t\t//Removed 'No valid subscription' message\n\t\t\tvoid({ //Ext.Msg.show({"$sub_file
print_yellow" o Done.\n"### Step 2: Restart PVE to take effect
print_yellow"[+] Restarting 'pveproxy' for changes to take effect..."
systemctlrestartpveproxy
print_yellow" o You will need to reload your page/clear your cache to see these changes (or open with a private window)."
print_yellow" o Done.\n"