From a2608913e5527b46d14601e90dfa4d93fdd41271 Mon Sep 17 00:00:00 2001 From: Scott B <28817345+foundObjects@users.noreply.github.com> Date: Sat, 11 Jan 2020 22:42:38 -0800 Subject: [PATCH] hook script: fixed grep test issue --- pve-nag-buster.sh | 2 +- src/script | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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