mirror of
https://github.com/andrewpayne68/proxmox-nag-buster.git
synced 2025-01-18 08:27:50 +00:00
code cleanup: codefmt pass
This commit is contained in:
parent
674e924eaf
commit
9f3a23fc88
18
install.sh
18
install.sh
|
@ -24,7 +24,7 @@ RELEASE=$(awk -F"[)(]+" '/VERSION=/ {print $2}' /etc/os-release)
|
|||
# create the pve-no-subscription list
|
||||
|
||||
echo "$0: Creating PVE no-subscription repo list ..."
|
||||
cat <<EOF>"/etc/apt/sources.list.d/pve-no-subscription.list"
|
||||
cat << EOF > "/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
|
||||
|
@ -35,7 +35,7 @@ EOF
|
|||
|
||||
# create dpkg pre/post install hooks for persistence
|
||||
|
||||
cat <<'EOF' >/etc/apt/apt.conf.d/86pve-nags
|
||||
cat << 'EOF' > /etc/apt/apt.conf.d/86pve-nags
|
||||
DPkg::Pre-Install-Pkgs {
|
||||
"while read -r pkg; do case $pkg in *proxmox-widget-toolkit* | *pve-manager*) touch /tmp/.pve-nag-buster && exit 0; esac done < /dev/stdin";
|
||||
};
|
||||
|
@ -47,11 +47,11 @@ EOF
|
|||
|
||||
# fetch the post-install patch script, patches license nag and switches to pve-no-subscription repository as needed
|
||||
|
||||
if true ; then
|
||||
if true; then
|
||||
wget https://raw.githubusercontent.com/foundObjects/pve-nag-buster/master/pve-nag-buster.sh \
|
||||
-O "/usr/share/pve-nag-buster.sh" && \
|
||||
chmod +x "/usr/share/pve-nag-buster.sh" && \
|
||||
/usr/share/pve-nag-buster.sh
|
||||
-O "/usr/share/pve-nag-buster.sh" &&
|
||||
chmod +x "/usr/share/pve-nag-buster.sh" &&
|
||||
/usr/share/pve-nag-buster.sh
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
@ -67,9 +67,7 @@ fi
|
|||
|
||||
# pve-nag-buster.sh (v02) inline:
|
||||
|
||||
base64 -d <<"YEET"| unxz > "/usr/share/pve-nag-buster.sh" && \
|
||||
chmod +x "/usr/share/pve-nag-buster.sh" && \
|
||||
/usr/share/pve-nag-buster.sh
|
||||
base64 -d << "YEET" | unxz > "/usr/share/pve-nag-buster.sh" &&
|
||||
/Td6WFoAAATm1rRGAgAhARwAAAAQz1jM4AXCA29dABGIQkY99Bhqpmevep/kIs9shoiNvzAP074w
|
||||
LI3FnbhLtpij4weS6OPsQK59Kz5tjbWnQyPF33jFXvJXaoUNWDu1jNCPGEbx8L/Xao1oj9pvY3Kg
|
||||
1uiwbnqeiyZNxvEC9DBbNO8pmKBaOS/Q4uzqwh3oRXh87IgYrLRazyGxEY23Nvy1QWHNjNQmWeQJ
|
||||
|
@ -88,3 +86,5 @@ W7I/JpcDcABnxx6Y5xVgFDct7+xInHfC20EqN9H3p9PEotoUodAy8UckeQRo4RvQCKdKF6GUx3gt
|
|||
YaNlele6TN/8HU65WEjUrLAGm98+cl4DdYyuEnOmJTEDUmb047/bftabhnWzfKwL0UQ4OWj5GAAA
|
||||
95IH9OjVadkAAYsHwwsAAN9Cr22xxGf7AgAAAAAEWVo=
|
||||
YEET
|
||||
chmod +x "/usr/share/pve-nag-buster.sh" &&
|
||||
/usr/share/pve-nag-buster.sh
|
||||
|
|
|
@ -25,9 +25,9 @@ NAGFILE="/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js"
|
|||
# disable license nag: https://johnscs.com/remove-proxmox51-subscription-notice/
|
||||
|
||||
if grep -qs "$NAGTOKEN" "$NAGFILE" > /dev/null 2>&1; then
|
||||
echo "$0: Removing Nag ..."
|
||||
sed -i.orig "s/$NAGTOKEN/false/g" "$NAGFILE"
|
||||
systemctl restart pveproxy.service
|
||||
echo "$0: Removing Nag ..."
|
||||
sed -i.orig "s/$NAGTOKEN/false/g" "$NAGFILE"
|
||||
systemctl restart pveproxy.service
|
||||
fi
|
||||
|
||||
# disable paid repo list
|
||||
|
@ -35,6 +35,6 @@ fi
|
|||
PAID_BASE="/etc/apt/sources.list.d/pve-enterprise"
|
||||
|
||||
if [ -f "$PAID_BASE.list" ]; then
|
||||
echo "$0: Disabling PVE paid repo list ..."
|
||||
mv -f "$PAID_BASE.list" "$PAID_BASE.disabled"
|
||||
echo "$0: Disabling PVE paid repo list ..."
|
||||
mv -f "$PAID_BASE.list" "$PAID_BASE.disabled"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue