mirror of
https://github.com/andrewpayne68/proxmox-nag-buster.git
synced 2025-01-18 16:37:51 +00:00
hook script: fixed grep test issue
This commit is contained in:
parent
427b23b12c
commit
a2608913e5
|
@ -24,7 +24,7 @@ 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 -q "$NAGTOKEN" "$NAGFILE") ; 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
|
||||||
|
|
|
@ -24,7 +24,7 @@ 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 -q "$NAGTOKEN" "$NAGFILE") ; 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
|
||||||
|
|
Loading…
Reference in a new issue