|
|
|
|
@ -17,7 +17,6 @@
|
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
|
|
|
|
|
|
RELEASE=$(awk -F"[)(]+" '/VERSION=/ {print $2}' /etc/os-release)
|
|
|
|
|
NAGTOKEN="data.status !== 'Active'"
|
|
|
|
|
NAGFILE="/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js"
|
|
|
|
|
|
|
|
|
|
@ -29,21 +28,11 @@ if $(grep -q "$NAGTOKEN" "$NAGFILE") ; then
|
|
|
|
|
systemctl restart pveproxy.service
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
PAID_BASE="/etc/apt/sources.list.d/pve-enterprise"
|
|
|
|
|
FREE_LIST="/etc/apt/sources.list.d/pve-no-subscription.list"
|
|
|
|
|
# disable paid repo list
|
|
|
|
|
|
|
|
|
|
# switch to pve-no-subscription repo
|
|
|
|
|
PAID_BASE="/etc/apt/sources.list.d/pve-enterprise"
|
|
|
|
|
|
|
|
|
|
if [ -f "$PAID_BASE.list" ]; then
|
|
|
|
|
echo "$0: Updating PVE repo lists ..."
|
|
|
|
|
echo "$0: Disabling PVE paid repo list ..."
|
|
|
|
|
mv -f "$PAID_BASE.list" "$PAID_BASE.disabled"
|
|
|
|
|
cat <<EOF>"$FREE_LIST"
|
|
|
|
|
# .list file automatically generated by $0 at $(date)
|
|
|
|
|
#
|
|
|
|
|
# Do not edit this file by hand, it will be overwritten
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
deb http://download.proxmox.com/debian/pve $RELEASE pve-no-subscription
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|