Skip to content

Instantly share code, notes, and snippets.

@jrtashjian
Last active December 18, 2021 20:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jrtashjian/1fee957644f813c54f45327fa09b8249 to your computer and use it in GitHub Desktop.
Save jrtashjian/1fee957644f813c54f45327fa09b8249 to your computer and use it in GitHub Desktop.
Disable Proxmox license nag.
#!/bin/sh
NAGTOKEN="data.status.toLowerCase() !== 'active'"
NAGFILE="/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js"
SCRIPT="$(basename "$0")"
# Disable license nag
if grep -qs "$NAGTOKEN" "$NAGFILE" > /dev/null 2>&1; then
echo "$SCRIPT: Removing PVE Nag..."
sed -i.orig "s/$NAGTOKEN/false/g" "$NAGFILE"
fi
# Disable paid repo list
PAID_BASE="/etc/apt/sources.list.d/pve-enterprise"
if [ -f "$PAID_BASE.list" ]; then
echo "$SCRIPT: Disabling PVE paid repo list..."
mv -f "$PAID_BASE.list" "$PAID_BASE.disabled"
fi
# Add PVE no-subscription repo list
FREE_BASE="/etc/apt/sources.list.d/pve-no-subscription"
if [ ! -f "$FREE_BASE.list" ]; then
echo "$SCRIPT: Enabling PVE free repo list..."
echo "deb http://download.proxmox.com/debian/pve bullseye pve-no-subscription" > "$FREE_BASE.list"
apt update -y
fi
systemctl restart pveproxy.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment