From 7fd43cd4391f8cb59d83aa58636e4b6b78014c81 Mon Sep 17 00:00:00 2001 From: th33xitus Date: Sun, 29 May 2022 20:05:20 +0200 Subject: [PATCH] fix(utilities.sh): silence grep Signed-off-by: Dominik Willner th33xitus@gmail.com --- scripts/utilities.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/utilities.sh b/scripts/utilities.sh index eeeb586..9d5bc43 100644 --- a/scripts/utilities.sh +++ b/scripts/utilities.sh @@ -251,7 +251,7 @@ function set_klipper_cfg_path() { for service in ${klipper_services}; do if [[ ${service} = "/etc/systemd/system/klipper.service" ]]; then - if grep "Environment=KLIPPER_CONFIG=" "${service}"; then + if grep -q "Environment=KLIPPER_CONFIG=" "${service}"; then ### single instance klipper service installed by kiauh v4 / MainsailOS > 0.5.0 sudo sed -i -r "/KLIPPER_CONFIG=/ s|CONFIG=(.+)\/printer\.cfg|CONFIG=${new_cfg_loc}/printer\.cfg|" "${service}" else @@ -262,7 +262,7 @@ function set_klipper_cfg_path() { else instance=$(echo "${service}" | cut -d"-" -f2 | cut -d"." -f1) - if grep "Environment=KLIPPER_CONFIG=" "${service}"; then + if grep -q "Environment=KLIPPER_CONFIG=" "${service}"; then ### multi instance klipper service installed by kiauh v4 / MainsailOS > 0.5.0 sudo sed -i -r "/KLIPPER_CONFIG=/ s|CONFIG=(.+)\/printer_${instance}\/printer\.cfg|CONFIG=${new_cfg_loc}\/printer_${instance}\/printer\.cfg|" "${service}" else @@ -283,7 +283,7 @@ function set_klipper_cfg_path() { for service in ${moonraker_services}; do if [[ ${service} = "/etc/systemd/system/moonraker.service" ]]; then - if grep "Environment=MOONRAKER_CONF=" "${service}"; then + if grep -q "Environment=MOONRAKER_CONF=" "${service}"; then ### single instance moonraker service installed by kiauh v4 / MainsailOS > 0.5.0 sudo sed -i -r "/MOONRAKER_CONF=/ s|_CONF=(.+)\/moonraker\.conf|_CONF=${new_cfg_loc}\/moonraker\.conf|" "${service}" else @@ -294,7 +294,7 @@ function set_klipper_cfg_path() { else instance=$(echo "${service}" | cut -d"-" -f2 | cut -d"." -f1) - if grep "Environment=MOONRAKER_CONF=" "${service}"; then + if grep -q "Environment=MOONRAKER_CONF=" "${service}"; then ### multi instance moonraker service installed by kiauh v4 / MainsailOS > 0.5.0 sudo sed -i -r "/MOONRAKER_CONF=/ s|_CONF=(.+)\/printer_${instance}\/moonraker\.conf|_CONF=${new_cfg_loc}\/printer_${instance}\/moonraker\.conf|" "${service}" else