code cleanup: codefmt pass

This commit is contained in:
Scott B 2020-01-12 17:55:47 -08:00
parent 674e924eaf
commit 9f3a23fc88
2 changed files with 14 additions and 14 deletions

View file

@ -24,7 +24,7 @@ RELEASE=$(awk -F"[)(]+" '/VERSION=/ {print $2}' /etc/os-release)
# create the pve-no-subscription list # create the pve-no-subscription list
echo "$0: Creating PVE no-subscription repo 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) # .list file automatically generated by pve-nag-buster:$0 at $(date)
# #
# If $0 is run again this file will likely be overwritten # If $0 is run again this file will likely be overwritten
@ -35,7 +35,7 @@ EOF
# create dpkg pre/post install hooks for persistence # 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 { 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"; "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 # 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 \ wget https://raw.githubusercontent.com/foundObjects/pve-nag-buster/master/pve-nag-buster.sh \
-O "/usr/share/pve-nag-buster.sh" && \ -O "/usr/share/pve-nag-buster.sh" &&
chmod +x "/usr/share/pve-nag-buster.sh" && \ chmod +x "/usr/share/pve-nag-buster.sh" &&
/usr/share/pve-nag-buster.sh /usr/share/pve-nag-buster.sh
exit 0 exit 0
fi fi
@ -67,9 +67,7 @@ fi
# pve-nag-buster.sh (v02) inline: # pve-nag-buster.sh (v02) inline:
base64 -d <<"YEET"| unxz > "/usr/share/pve-nag-buster.sh" && \ base64 -d << "YEET" | unxz > "/usr/share/pve-nag-buster.sh" &&
chmod +x "/usr/share/pve-nag-buster.sh" && \
/usr/share/pve-nag-buster.sh
/Td6WFoAAATm1rRGAgAhARwAAAAQz1jM4AXCA29dABGIQkY99Bhqpmevep/kIs9shoiNvzAP074w /Td6WFoAAATm1rRGAgAhARwAAAAQz1jM4AXCA29dABGIQkY99Bhqpmevep/kIs9shoiNvzAP074w
LI3FnbhLtpij4weS6OPsQK59Kz5tjbWnQyPF33jFXvJXaoUNWDu1jNCPGEbx8L/Xao1oj9pvY3Kg LI3FnbhLtpij4weS6OPsQK59Kz5tjbWnQyPF33jFXvJXaoUNWDu1jNCPGEbx8L/Xao1oj9pvY3Kg
1uiwbnqeiyZNxvEC9DBbNO8pmKBaOS/Q4uzqwh3oRXh87IgYrLRazyGxEY23Nvy1QWHNjNQmWeQJ 1uiwbnqeiyZNxvEC9DBbNO8pmKBaOS/Q4uzqwh3oRXh87IgYrLRazyGxEY23Nvy1QWHNjNQmWeQJ
@ -88,3 +86,5 @@ W7I/JpcDcABnxx6Y5xVgFDct7+xInHfC20EqN9H3p9PEotoUodAy8UckeQRo4RvQCKdKF6GUx3gt
YaNlele6TN/8HU65WEjUrLAGm98+cl4DdYyuEnOmJTEDUmb047/bftabhnWzfKwL0UQ4OWj5GAAA YaNlele6TN/8HU65WEjUrLAGm98+cl4DdYyuEnOmJTEDUmb047/bftabhnWzfKwL0UQ4OWj5GAAA
95IH9OjVadkAAYsHwwsAAN9Cr22xxGf7AgAAAAAEWVo= 95IH9OjVadkAAYsHwwsAAN9Cr22xxGf7AgAAAAAEWVo=
YEET YEET
chmod +x "/usr/share/pve-nag-buster.sh" &&
/usr/share/pve-nag-buster.sh

View file

@ -25,9 +25,9 @@ NAGFILE="/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js"
# disable license nag: https://johnscs.com/remove-proxmox51-subscription-notice/ # disable license nag: https://johnscs.com/remove-proxmox51-subscription-notice/
if grep -qs "$NAGTOKEN" "$NAGFILE" > /dev/null 2>&1; then if grep -qs "$NAGTOKEN" "$NAGFILE" > /dev/null 2>&1; then
echo "$0: Removing Nag ..." echo "$0: Removing Nag ..."
sed -i.orig "s/$NAGTOKEN/false/g" "$NAGFILE" sed -i.orig "s/$NAGTOKEN/false/g" "$NAGFILE"
systemctl restart pveproxy.service systemctl restart pveproxy.service
fi fi
# disable paid repo list # disable paid repo list
@ -35,6 +35,6 @@ fi
PAID_BASE="/etc/apt/sources.list.d/pve-enterprise" PAID_BASE="/etc/apt/sources.list.d/pve-enterprise"
if [ -f "$PAID_BASE.list" ]; then if [ -f "$PAID_BASE.list" ]; then
echo "$0: Disabling PVE paid repo list ..." echo "$0: Disabling PVE paid repo list ..."
mv -f "$PAID_BASE.list" "$PAID_BASE.disabled" mv -f "$PAID_BASE.list" "$PAID_BASE.disabled"
fi fi