diff --git a/pve-nag-buster.sh b/pve-nag-buster.sh index 60ae1a5..07ca277 100755 --- a/pve-nag-buster.sh +++ b/pve-nag-buster.sh @@ -24,7 +24,7 @@ NAGFILE="/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js" # disable license nag: https://johnscs.com/remove-proxmox51-subscription-notice/ -if $(grep -q "$NAGTOKEN" "$NAGFILE") ; then +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 diff --git a/src/script b/src/script index 295774b..81fefa8 100644 --- a/src/script +++ b/src/script @@ -24,7 +24,7 @@ NAGFILE="/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js" # disable license nag: https://johnscs.com/remove-proxmox51-subscription-notice/ -if $(grep -q "$NAGTOKEN" "$NAGFILE") ; then +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