diff --git a/install.sh b/install.sh old mode 100644 new mode 100755 index 572066b..992cf7c --- a/install.sh +++ b/install.sh @@ -19,6 +19,20 @@ # 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) + +# create the pve-no-subscription list + +echo "$0: Creating PVE no-subscription repo list ..." +cat <"/etc/apt/sources.list.d/pve-no-subscription.list" +# .list file automatically generated by pve-nag-buster:$0 at $(date) +# +# If $0 is run again this file will likely be overwritten +# + +deb http://download.proxmox.com/debian/pve $RELEASE pve-no-subscription +EOF + # create dpkg pre/post install hooks for persistence cat <<'EOF' >/etc/apt/apt.conf.d/86pve-nags diff --git a/pve-nag-buster.sh b/pve-nag-buster.sh old mode 100644 new mode 100755 index 460841d..34c864e --- a/pve-nag-buster.sh +++ b/pve-nag-buster.sh @@ -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 <"$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