hook script: fixed grep test issue

This commit is contained in:
Scott B 2020-01-11 22:42:38 -08:00
parent 427b23b12c
commit a2608913e5
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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