Last active
December 18, 2021 20:35
-
-
Save jrtashjian/1fee957644f813c54f45327fa09b8249 to your computer and use it in GitHub Desktop.
Disable Proxmox license nag.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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